diff --git a/generator/main.go b/generator/main.go index 4d39c03..235be32 100644 --- a/generator/main.go +++ b/generator/main.go @@ -457,9 +457,19 @@ func writeStruct(f *jen.File, s *Schema) error { } field = field.Tag(map[string]string{"json": strings.ReplaceAll(tag, `\`, "")}) + + // Adds a comment if it's not equal to the field name + if p.Description != "" && p.Description != p.CamelName { + field = field.Add(jen.Comment(p.Description)) + } + fields = append(fields, field) } + if s.Description != "" { + f.Comment(fmt.Sprintf("%s %s", s.CamelName, s.Description)) + } + f.Type().Id(s.CamelName).Struct(fields...) return nil diff --git a/generator/models.go b/generator/models.go index 1466cbc..0b3a99a 100644 --- a/generator/models.go +++ b/generator/models.go @@ -139,6 +139,7 @@ type Schema struct { Default any `json:"default"` MinItems int `json:"minItems"` Ref string `json:"$ref"` + Description string `json:"description"` CamelName string `json:"for-hash-only!"` required bool name string diff --git a/handler/account/account.go b/handler/account/account.go index a06cc10..d3713b4 100644 --- a/handler/account/account.go +++ b/handler/account/account.go @@ -274,144 +274,165 @@ func AccessSourceTypeChoices() []string { return []string{"descendant_membership", "organization_membership", "project_membership", "team_membership"} } +// AccountAttachPaymentMethodIn AccountAttachPaymentMethodRequestBody type AccountAttachPaymentMethodIn struct { - PaymentMethodId string `json:"payment_method_id"` + PaymentMethodId string `json:"payment_method_id"` // Unique identifier for a Stripe payment method } + +// AccountAttachPaymentMethodOut User credit card information type AccountAttachPaymentMethodOut struct { Brand string `json:"brand"` - CardId string `json:"card_id"` + CardId string `json:"card_id"` // Credit card ID Country string `json:"country"` - CountryCode string `json:"country_code"` - ExpMonth int `json:"exp_month"` - ExpYear int `json:"exp_year"` - Last4 string `json:"last4"` - Name string `json:"name"` - OrganizationId *string `json:"organization_id,omitempty"` - Projects []string `json:"projects"` + CountryCode string `json:"country_code"` // Two letter ISO country code + ExpMonth int `json:"exp_month"` // Expiration month + ExpYear int `json:"exp_year"` // Expiration year + Last4 string `json:"last4"` // Credit card last four digits + Name string `json:"name"` // Name on the credit card + OrganizationId *string `json:"organization_id,omitempty"` // Organization ID + Projects []string `json:"projects"` // List of projects the card is assigned to } type AccountBillingGroupOut struct { - AccountId string `json:"account_id"` - AccountName string `json:"account_name"` - AddressLines []string `json:"address_lines"` - BillingAddress *string `json:"billing_address,omitempty"` - BillingCurrency BillingCurrencyType `json:"billing_currency"` - BillingEmails []BillingEmailOut `json:"billing_emails"` - BillingExtraText string `json:"billing_extra_text"` - BillingGroupId string `json:"billing_group_id"` - BillingGroupName string `json:"billing_group_name"` - CardInfo CardInfoOut `json:"card_info"` - City string `json:"city"` - Company string `json:"company"` - Country string `json:"country"` - CountryCode string `json:"country_code"` - CreateTime time.Time `json:"create_time"` - EstimatedBalanceLocal string `json:"estimated_balance_local"` - EstimatedBalanceUsd string `json:"estimated_balance_usd"` - PaymentMethod PaymentMethodType `json:"payment_method"` - State string `json:"state"` - VatId string `json:"vat_id"` - ZipCode string `json:"zip_code"` -} + AccountId string `json:"account_id"` // Account ID + AccountName string `json:"account_name"` // Account name + AddressLines []string `json:"address_lines"` // 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"` // Billing currency + BillingEmails []BillingEmailOut `json:"billing_emails"` // List of project billing email addresses + BillingExtraText string `json:"billing_extra_text"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number + BillingGroupId string `json:"billing_group_id"` // Billing group ID + BillingGroupName string `json:"billing_group_name"` // Billing group name + CardInfo CardInfoOut `json:"card_info"` // Credit card assigned to the project + City string `json:"city"` // Address city + Company string `json:"company"` // Name of a company + Country string `json:"country"` // Billing country + CountryCode string `json:"country_code"` // Two letter ISO country code + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + EstimatedBalanceLocal string `json:"estimated_balance_local"` // Estimated balance in billing currency, before tax + EstimatedBalanceUsd string `json:"estimated_balance_usd"` // Estimated balance in USD, before tax + PaymentMethod PaymentMethodType `json:"payment_method"` // Payment method + State string `json:"state"` // Address state + VatId string `json:"vat_id"` // EU VAT Identification Number + ZipCode string `json:"zip_code"` // Address zip code +} + +// AccountCreateIn AccountCreateRequestBody type AccountCreateIn struct { - AccountName string `json:"account_name"` - ParentAccountId *string `json:"parent_account_id,omitempty"` - PrimaryBillingGroupId *string `json:"primary_billing_group_id,omitempty"` + AccountName string `json:"account_name"` // Account name + ParentAccountId *string `json:"parent_account_id,omitempty"` // Account ID + PrimaryBillingGroupId *string `json:"primary_billing_group_id,omitempty"` // Billing group ID } + +// AccountCreateOut Account details type AccountCreateOut struct { - AccessSource AccessSourceType `json:"access_source,omitempty"` - AccountId string `json:"account_id"` - AccountName string `json:"account_name"` - AccountOwnerTeamId string `json:"account_owner_team_id"` - CreateTime time.Time `json:"create_time"` - Features map[string]any `json:"features,omitempty"` - IsAccountMember *bool `json:"is_account_member,omitempty"` - IsAccountOwner bool `json:"is_account_owner"` - OrganizationId string `json:"organization_id"` - ParentAccountId *string `json:"parent_account_id,omitempty"` - PrimaryBillingGroupId string `json:"primary_billing_group_id"` - RootAccountId string `json:"root_account_id"` - TenantId *string `json:"tenant_id,omitempty"` - UpdateTime time.Time `json:"update_time"` -} + AccessSource AccessSourceType `json:"access_source,omitempty"` // Describe the source of the account + AccountId string `json:"account_id"` // Account ID + AccountName string `json:"account_name"` // Account name + AccountOwnerTeamId string `json:"account_owner_team_id"` // Team ID + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + Features map[string]any `json:"features,omitempty"` // Feature flags + IsAccountMember *bool `json:"is_account_member,omitempty"` // If true, user is part of a team of this or a parent account + IsAccountOwner bool `json:"is_account_owner"` // If true, user is part of the owners team for this account + OrganizationId string `json:"organization_id"` // Organization ID + ParentAccountId *string `json:"parent_account_id,omitempty"` // Account ID + PrimaryBillingGroupId string `json:"primary_billing_group_id"` // Billing group ID + RootAccountId string `json:"root_account_id"` // Account ID + TenantId *string `json:"tenant_id,omitempty"` // Tenant identifier + UpdateTime time.Time `json:"update_time"` // Timestamp in ISO 8601 format, always in UTC +} + +// AccountGetOut Account details type AccountGetOut struct { - AccessSource AccessSourceType `json:"access_source,omitempty"` - AccountId string `json:"account_id"` - AccountName string `json:"account_name"` - AccountOwnerTeamId string `json:"account_owner_team_id"` - CreateTime time.Time `json:"create_time"` - Features map[string]any `json:"features,omitempty"` - IsAccountMember *bool `json:"is_account_member,omitempty"` - IsAccountOwner bool `json:"is_account_owner"` - OrganizationId string `json:"organization_id"` - ParentAccountId *string `json:"parent_account_id,omitempty"` - PrimaryBillingGroupId string `json:"primary_billing_group_id"` - RootAccountId string `json:"root_account_id"` - TenantId *string `json:"tenant_id,omitempty"` - UpdateTime time.Time `json:"update_time"` -} + AccessSource AccessSourceType `json:"access_source,omitempty"` // Describe the source of the account + AccountId string `json:"account_id"` // Account ID + AccountName string `json:"account_name"` // Account name + AccountOwnerTeamId string `json:"account_owner_team_id"` // Team ID + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + Features map[string]any `json:"features,omitempty"` // Feature flags + IsAccountMember *bool `json:"is_account_member,omitempty"` // If true, user is part of a team of this or a parent account + IsAccountOwner bool `json:"is_account_owner"` // If true, user is part of the owners team for this account + OrganizationId string `json:"organization_id"` // Organization ID + ParentAccountId *string `json:"parent_account_id,omitempty"` // Account ID + PrimaryBillingGroupId string `json:"primary_billing_group_id"` // Billing group ID + RootAccountId string `json:"root_account_id"` // Account ID + TenantId *string `json:"tenant_id,omitempty"` // Tenant identifier + UpdateTime time.Time `json:"update_time"` // Timestamp in ISO 8601 format, always in UTC +} + +// AccountMoveIn AccountMoveRequestBody type AccountMoveIn struct { - ParentAccountId string `json:"parent_account_id"` + ParentAccountId string `json:"parent_account_id"` // Account ID } + +// AccountMoveOut Account details type AccountMoveOut struct { - AccessSource AccessSourceType `json:"access_source,omitempty"` - AccountId string `json:"account_id"` - AccountName string `json:"account_name"` - AccountOwnerTeamId string `json:"account_owner_team_id"` - CreateTime time.Time `json:"create_time"` - Features map[string]any `json:"features,omitempty"` - IsAccountMember *bool `json:"is_account_member,omitempty"` - IsAccountOwner bool `json:"is_account_owner"` - OrganizationId string `json:"organization_id"` - ParentAccountId *string `json:"parent_account_id,omitempty"` - PrimaryBillingGroupId string `json:"primary_billing_group_id"` - RootAccountId string `json:"root_account_id"` - TenantId *string `json:"tenant_id,omitempty"` - UpdateTime time.Time `json:"update_time"` + AccessSource AccessSourceType `json:"access_source,omitempty"` // Describe the source of the account + AccountId string `json:"account_id"` // Account ID + AccountName string `json:"account_name"` // Account name + AccountOwnerTeamId string `json:"account_owner_team_id"` // Team ID + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + Features map[string]any `json:"features,omitempty"` // Feature flags + IsAccountMember *bool `json:"is_account_member,omitempty"` // If true, user is part of a team of this or a parent account + IsAccountOwner bool `json:"is_account_owner"` // If true, user is part of the owners team for this account + OrganizationId string `json:"organization_id"` // Organization ID + ParentAccountId *string `json:"parent_account_id,omitempty"` // Account ID + PrimaryBillingGroupId string `json:"primary_billing_group_id"` // Billing group ID + RootAccountId string `json:"root_account_id"` // Account ID + TenantId *string `json:"tenant_id,omitempty"` // Tenant identifier + UpdateTime time.Time `json:"update_time"` // Timestamp in ISO 8601 format, always in UTC } type AccountOut struct { - AccessSource AccessSourceType `json:"access_source,omitempty"` - AccountId string `json:"account_id"` - AccountName string `json:"account_name"` - AccountOwnerTeamId string `json:"account_owner_team_id"` - CreateTime time.Time `json:"create_time"` - Features map[string]any `json:"features,omitempty"` - IsAccountMember *bool `json:"is_account_member,omitempty"` - IsAccountOwner bool `json:"is_account_owner"` - OrganizationId string `json:"organization_id"` - ParentAccountId *string `json:"parent_account_id,omitempty"` - PrimaryBillingGroupId string `json:"primary_billing_group_id"` - RootAccountId string `json:"root_account_id"` - TenantId *string `json:"tenant_id,omitempty"` - UpdateTime time.Time `json:"update_time"` -} + AccessSource AccessSourceType `json:"access_source,omitempty"` // Describe the source of the account + AccountId string `json:"account_id"` // Account ID + AccountName string `json:"account_name"` // Account name + AccountOwnerTeamId string `json:"account_owner_team_id"` // Team ID + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + Features map[string]any `json:"features,omitempty"` // Feature flags + IsAccountMember *bool `json:"is_account_member,omitempty"` // If true, user is part of a team of this or a parent account + IsAccountOwner bool `json:"is_account_owner"` // If true, user is part of the owners team for this account + OrganizationId string `json:"organization_id"` // Organization ID + ParentAccountId *string `json:"parent_account_id,omitempty"` // Account ID + PrimaryBillingGroupId string `json:"primary_billing_group_id"` // Billing group ID + RootAccountId string `json:"root_account_id"` // Account ID + TenantId *string `json:"tenant_id,omitempty"` // Tenant identifier + UpdateTime time.Time `json:"update_time"` // Timestamp in ISO 8601 format, always in UTC +} + +// AccountProjectsListOut AccountProjectsListResponse type AccountProjectsListOut struct { - Projects []ProjectOut `json:"projects"` - TotalProjectCount *int `json:"total_project_count,omitempty"` + Projects []ProjectOut `json:"projects"` // List of projects + TotalProjectCount *int `json:"total_project_count,omitempty"` // Total count of projects associated to account. } + +// AccountUpdateIn AccountUpdateRequestBody type AccountUpdateIn struct { - AccountName *string `json:"account_name,omitempty"` - PrimaryBillingGroupId *string `json:"primary_billing_group_id,omitempty"` + AccountName *string `json:"account_name,omitempty"` // Account name + PrimaryBillingGroupId *string `json:"primary_billing_group_id,omitempty"` // Billing group ID } + +// AccountUpdateOut Account details type AccountUpdateOut struct { - AccessSource AccessSourceType `json:"access_source,omitempty"` - AccountId string `json:"account_id"` - AccountName string `json:"account_name"` - AccountOwnerTeamId string `json:"account_owner_team_id"` - CreateTime time.Time `json:"create_time"` - Features map[string]any `json:"features,omitempty"` - IsAccountMember *bool `json:"is_account_member,omitempty"` - IsAccountOwner bool `json:"is_account_owner"` - OrganizationId string `json:"organization_id"` - ParentAccountId *string `json:"parent_account_id,omitempty"` - PrimaryBillingGroupId string `json:"primary_billing_group_id"` - RootAccountId string `json:"root_account_id"` - TenantId *string `json:"tenant_id,omitempty"` - UpdateTime time.Time `json:"update_time"` -} + AccessSource AccessSourceType `json:"access_source,omitempty"` // Describe the source of the account + AccountId string `json:"account_id"` // Account ID + AccountName string `json:"account_name"` // Account name + AccountOwnerTeamId string `json:"account_owner_team_id"` // Team ID + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + Features map[string]any `json:"features,omitempty"` // Feature flags + IsAccountMember *bool `json:"is_account_member,omitempty"` // If true, user is part of a team of this or a parent account + IsAccountOwner bool `json:"is_account_owner"` // If true, user is part of the owners team for this account + OrganizationId string `json:"organization_id"` // Organization ID + ParentAccountId *string `json:"parent_account_id,omitempty"` // Account ID + PrimaryBillingGroupId string `json:"primary_billing_group_id"` // Billing group ID + RootAccountId string `json:"root_account_id"` // Account ID + TenantId *string `json:"tenant_id,omitempty"` // Tenant identifier + UpdateTime time.Time `json:"update_time"` // Timestamp in ISO 8601 format, always in UTC +} + +// AccountUsersSearchIn AccountUsersSearchRequestBody type AccountUsersSearchIn struct { - Limit *int `json:"limit,omitempty"` - OrderBy OrderByType `json:"order_by,omitempty"` - Query *string `json:"query,omitempty"` + Limit *int `json:"limit,omitempty"` // Maximum number of results to return + OrderBy OrderByType `json:"order_by,omitempty"` // Sorting criteria; desc is descending order and asc ascending + Query *string `json:"query,omitempty"` // Filter keyword } type BillingCurrencyType string @@ -435,45 +456,51 @@ func BillingCurrencyTypeChoices() []string { } type BillingEmailOut struct { - Email string `json:"email"` + Email string `json:"email"` // User email address } + +// CardInfoOut Credit card assigned to the project type CardInfoOut struct { Brand string `json:"brand"` - CardId string `json:"card_id"` + CardId string `json:"card_id"` // Credit card ID Country string `json:"country"` - CountryCode string `json:"country_code"` - ExpMonth int `json:"exp_month"` - ExpYear int `json:"exp_year"` - Last4 string `json:"last4"` - Name string `json:"name"` - UserEmail string `json:"user_email"` + CountryCode string `json:"country_code"` // Two letter ISO country code + ExpMonth int `json:"exp_month"` // Expiration month + ExpYear int `json:"exp_year"` // Expiration year + Last4 string `json:"last4"` // Credit card last four digits + Name string `json:"name"` // Name on the credit card + UserEmail string `json:"user_email"` // User email address } type CardOut struct { Brand string `json:"brand"` - CardId string `json:"card_id"` + CardId string `json:"card_id"` // Credit card ID Country string `json:"country"` - CountryCode string `json:"country_code"` - ExpMonth int `json:"exp_month"` - ExpYear int `json:"exp_year"` - Last4 string `json:"last4"` - Name string `json:"name"` + CountryCode string `json:"country_code"` // Two letter ISO country code + ExpMonth int `json:"exp_month"` // Expiration month + ExpYear int `json:"exp_year"` // Expiration year + Last4 string `json:"last4"` // Credit card last four digits + Name string `json:"name"` // Name on the credit card } + +// ElasticsearchOut Service EOL extension type ElasticsearchOut struct { - EolDate string `json:"eol_date"` - Version string `json:"version"` + EolDate string `json:"eol_date"` // Extended EOL date + Version string `json:"version"` // Service version } + +// EndOfLifeExtensionOut End of life extension information type EndOfLifeExtensionOut struct { - Elasticsearch *ElasticsearchOut `json:"elasticsearch,omitempty"` + Elasticsearch *ElasticsearchOut `json:"elasticsearch,omitempty"` // Service EOL extension } type EventOut struct { - AccountId string `json:"account_id"` - ActionDescription string `json:"action_description"` - ActionType string `json:"action_type"` - Actor string `json:"actor"` - ActorUserId string `json:"actor_user_id"` - CreateTime time.Time `json:"create_time"` - LogEntryId int `json:"log_entry_id"` - TeamId string `json:"team_id"` + AccountId string `json:"account_id"` // Account ID + ActionDescription string `json:"action_description"` // Event description + ActionType string `json:"action_type"` // Event type + Actor string `json:"actor"` // Actor details + ActorUserId string `json:"actor_user_id"` // User ID + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + LogEntryId int `json:"log_entry_id"` // Entry ID + TeamId string `json:"team_id"` // Team ID } type MemberType string @@ -519,86 +546,108 @@ func PaymentMethodTypeChoices() []string { } type ProjectOut struct { - AccountId string `json:"account_id"` - AccountName *string `json:"account_name,omitempty"` - AddressLines []string `json:"address_lines,omitempty"` - AvailableCredits *string `json:"available_credits,omitempty"` - BillingAddress string `json:"billing_address"` - BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` - BillingEmails []BillingEmailOut `json:"billing_emails"` - BillingExtraText *string `json:"billing_extra_text,omitempty"` - BillingGroupId string `json:"billing_group_id"` - BillingGroupName string `json:"billing_group_name"` - CardInfo *CardInfoOut `json:"card_info,omitempty"` - City *string `json:"city,omitempty"` - Company *string `json:"company,omitempty"` - Country string `json:"country"` - CountryCode string `json:"country_code"` - DefaultCloud string `json:"default_cloud"` - EndOfLifeExtension *EndOfLifeExtensionOut `json:"end_of_life_extension,omitempty"` - EstimatedBalance string `json:"estimated_balance"` - EstimatedBalanceLocal *string `json:"estimated_balance_local,omitempty"` - Features map[string]any `json:"features,omitempty"` - OrganizationId string `json:"organization_id"` - PaymentMethod string `json:"payment_method"` - ProjectName string `json:"project_name"` - State *string `json:"state,omitempty"` - Tags map[string]string `json:"tags,omitempty"` - TechEmails []TechEmailOut `json:"tech_emails,omitempty"` - TenantId *string `json:"tenant_id,omitempty"` - TrialExpirationTime *time.Time `json:"trial_expiration_time,omitempty"` - VatId string `json:"vat_id"` - ZipCode *string `json:"zip_code,omitempty"` + AccountId string `json:"account_id"` // Account ID + AccountName *string `json:"account_name,omitempty"` // Account name + AddressLines []string `json:"address_lines,omitempty"` // Address lines + AvailableCredits *string `json:"available_credits,omitempty"` // Available credits, in USD + BillingAddress string `json:"billing_address"` // DEPRECATED: use split address fields like company, address_lines, zip_code, city and state instead + BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` // Billing currency + BillingEmails []BillingEmailOut `json:"billing_emails"` // List of project billing email addresses + BillingExtraText *string `json:"billing_extra_text,omitempty"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number + BillingGroupId string `json:"billing_group_id"` // Billing group ID + BillingGroupName string `json:"billing_group_name"` // Billing group name + CardInfo *CardInfoOut `json:"card_info,omitempty"` // Credit card assigned to the project + City *string `json:"city,omitempty"` // Address city + Company *string `json:"company,omitempty"` // Name of a company + Country string `json:"country"` // Billing country + CountryCode string `json:"country_code"` // Two letter ISO country code + DefaultCloud string `json:"default_cloud"` // Default cloud to use when launching services + EndOfLifeExtension *EndOfLifeExtensionOut `json:"end_of_life_extension,omitempty"` // End of life extension information + EstimatedBalance string `json:"estimated_balance"` // Estimated balance, in USD + EstimatedBalanceLocal *string `json:"estimated_balance_local,omitempty"` // Estimated balance, in billing currency + Features map[string]any `json:"features,omitempty"` // Feature flags + OrganizationId string `json:"organization_id"` // Organization ID + PaymentMethod string `json:"payment_method"` // Payment method + ProjectName string `json:"project_name"` // Project name + State *string `json:"state,omitempty"` // Address state + Tags map[string]string `json:"tags,omitempty"` // Set of resource tags + TechEmails []TechEmailOut `json:"tech_emails,omitempty"` // List of project tech email addresses + TenantId *string `json:"tenant_id,omitempty"` // Tenant ID + TrialExpirationTime *time.Time `json:"trial_expiration_time,omitempty"` // Trial expiration time (ISO 8601) + VatId string `json:"vat_id"` // EU VAT Identification Number + ZipCode *string `json:"zip_code,omitempty"` // Address zip code } type TechEmailOut struct { - Email string `json:"email"` + Email string `json:"email"` // User email address } type UserOut struct { - RealName string `json:"real_name"` - UserEmail string `json:"user_email"` - UserId string `json:"user_id"` + RealName string `json:"real_name"` // User real name + UserEmail string `json:"user_email"` // User email address + UserId string `json:"user_id"` // User ID } type UserProjectOut struct { - AccessType *string `json:"access_type,omitempty"` - AccountId string `json:"account_id"` - CreateTime time.Time `json:"create_time"` - MemberType MemberType `json:"member_type"` - ProjectName string `json:"project_name"` - RealName string `json:"real_name"` - TeamId string `json:"team_id"` - TeamName string `json:"team_name"` - UserEmail string `json:"user_email"` -} + AccessType *string `json:"access_type,omitempty"` // Access type + AccountId string `json:"account_id"` // Account ID + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + MemberType MemberType `json:"member_type"` // Project member type + ProjectName string `json:"project_name"` // Project name + RealName string `json:"real_name"` // User real name + TeamId string `json:"team_id"` // Team ID + TeamName string `json:"team_name"` // Team name + UserEmail string `json:"user_email"` // User email address +} + +// accountAttachPaymentMethodOut AccountAttachPaymentMethodResponse type accountAttachPaymentMethodOut struct { - Card AccountAttachPaymentMethodOut `json:"card"` + Card AccountAttachPaymentMethodOut `json:"card"` // User credit card information } + +// accountBillingGroupListOut AccountBillingGroupListResponse type accountBillingGroupListOut struct { - AccountBillingGroups []AccountBillingGroupOut `json:"account_billing_groups"` + AccountBillingGroups []AccountBillingGroupOut `json:"account_billing_groups"` // List of billing groups } + +// accountCreateOut AccountCreateResponse type accountCreateOut struct { - Account AccountCreateOut `json:"account"` + Account AccountCreateOut `json:"account"` // Account details } + +// accountEventListOut AccountEventListResponse type accountEventListOut struct { - Events []EventOut `json:"events"` + Events []EventOut `json:"events"` // List of events } + +// accountGetOut AccountGetResponse type accountGetOut struct { - Account AccountGetOut `json:"account"` + Account AccountGetOut `json:"account"` // Account details } + +// accountListOut AccountListResponse type accountListOut struct { - Accounts []AccountOut `json:"accounts"` + Accounts []AccountOut `json:"accounts"` // List of accounts } + +// accountMoveOut AccountMoveResponse type accountMoveOut struct { - Account AccountMoveOut `json:"account"` + Account AccountMoveOut `json:"account"` // Account details } + +// accountPaymentMethodsListOut AccountPaymentMethodsListResponse type accountPaymentMethodsListOut struct { - Cards []CardOut `json:"cards"` + Cards []CardOut `json:"cards"` // List of account's credit cards } + +// accountUpdateOut AccountUpdateResponse type accountUpdateOut struct { - Account AccountUpdateOut `json:"account"` + Account AccountUpdateOut `json:"account"` // Account details } + +// accountUserProjectsListOut AccountUserProjectsListResponse type accountUserProjectsListOut struct { - UserProjects []UserProjectOut `json:"user_projects"` + UserProjects []UserProjectOut `json:"user_projects"` // List of user's projects } + +// accountUsersSearchOut AccountUsersSearchResponse type accountUsersSearchOut struct { - Users []UserOut `json:"users"` + Users []UserOut `json:"users"` // List of users } diff --git a/handler/accountauthentication/accountauthentication.go b/handler/accountauthentication/accountauthentication.go index 21c9ef8..1833bf7 100644 --- a/handler/accountauthentication/accountauthentication.go +++ b/handler/accountauthentication/accountauthentication.go @@ -107,194 +107,203 @@ func (h *AccountAuthenticationHandler) AccountAuthenticationMethodsList(ctx cont return out.AuthenticationMethods, nil } +// AccountAuthenticationMethodCreateIn AccountAuthenticationMethodCreateRequestBody type AccountAuthenticationMethodCreateIn struct { - AuthTokenExtendWhenUsed *bool `json:"auth_token_extend_when_used,omitempty"` - AuthTokenMaxAgeSeconds *int `json:"auth_token_max_age_seconds,omitempty"` - AuthenticationMethodName string `json:"authentication_method_name"` - AuthenticationMethodType AuthenticationMethodType `json:"authentication_method_type"` - AutoJoinTeamId *string `json:"auto_join_team_id,omitempty"` - AutoJoinUserGroupId *string `json:"auto_join_user_group_id,omitempty"` - LinkedDomains *[]LinkedDomainIn `json:"linked_domains,omitempty"` - SamlAssertionSignedEnabled *bool `json:"saml_assertion_signed_enabled,omitempty"` - SamlAuthnRequestsSignedEnabled *bool `json:"saml_authn_requests_signed_enabled,omitempty"` - SamlCertificate *string `json:"saml_certificate,omitempty"` - SamlDigestAlgorithm SamlDigestAlgorithmType `json:"saml_digest_algorithm,omitempty"` - SamlEntityId *string `json:"saml_entity_id,omitempty"` - SamlFieldMapping *SamlFieldMappingIn `json:"saml_field_mapping,omitempty"` - SamlIdpLoginAllowed *bool `json:"saml_idp_login_allowed,omitempty"` - SamlIdpUrl *string `json:"saml_idp_url,omitempty"` - SamlRequestedAuthnContextEnabled *bool `json:"saml_requested_authn_context_enabled,omitempty"` - SamlSignatureAlgorithm SamlSignatureAlgorithmType `json:"saml_signature_algorithm,omitempty"` - SamlVariant SamlVariantType `json:"saml_variant,omitempty"` - ScimEnabled *bool `json:"scim_enabled,omitempty"` + AuthTokenExtendWhenUsed *bool `json:"auth_token_extend_when_used,omitempty"` // Extend authentication token validity when used + AuthTokenMaxAgeSeconds *int `json:"auth_token_max_age_seconds,omitempty"` // Auth Token Max Age Seconds + AuthenticationMethodName string `json:"authentication_method_name"` // Authentication Method Name + AuthenticationMethodType AuthenticationMethodType `json:"authentication_method_type"` // Authentication method type + AutoJoinTeamId *string `json:"auto_join_team_id,omitempty"` // Automatically add users to a team, when user signs up using this authentication method + AutoJoinUserGroupId *string `json:"auto_join_user_group_id,omitempty"` // Automatically add users to a group, when user signs up using this authentication method + LinkedDomains *[]LinkedDomainIn `json:"linked_domains,omitempty"` // Linked Domains + SamlAssertionSignedEnabled *bool `json:"saml_assertion_signed_enabled,omitempty"` // Set to 'true' to enable WantAssertionsSigned + SamlAuthnRequestsSignedEnabled *bool `json:"saml_authn_requests_signed_enabled,omitempty"` // Set to 'true' to enable AuthnRequestsSigned + SamlCertificate *string `json:"saml_certificate,omitempty"` // Identity provider's certificate + SamlDigestAlgorithm SamlDigestAlgorithmType `json:"saml_digest_algorithm,omitempty"` // Digest algorithm. This is an advanced option that typically does not need to be set. + SamlEntityId *string `json:"saml_entity_id,omitempty"` // Saml Entity ID + SamlFieldMapping *SamlFieldMappingIn `json:"saml_field_mapping,omitempty"` // SAMLFieldMapping + SamlIdpLoginAllowed *bool `json:"saml_idp_login_allowed,omitempty"` // Set to 'true' to enable IdP initiated login + SamlIdpUrl *string `json:"saml_idp_url,omitempty"` // Saml Idp Url + SamlRequestedAuthnContextEnabled *bool `json:"saml_requested_authn_context_enabled,omitempty"` // Set to 'false' to disable RequestedAuthnContext + SamlSignatureAlgorithm SamlSignatureAlgorithmType `json:"saml_signature_algorithm,omitempty"` // SAMLSignatureAlgorithm + SamlVariant SamlVariantType `json:"saml_variant,omitempty"` // SAMLVariant + ScimEnabled *bool `json:"scim_enabled,omitempty"` // SCIM enabled } + +// AccountAuthenticationMethodCreateOut AuthenticationMethod type AccountAuthenticationMethodCreateOut struct { - AccountId string `json:"account_id"` - AuthTokenExtendWhenUsed *bool `json:"auth_token_extend_when_used,omitempty"` - AuthTokenMaxAgeSeconds *int `json:"auth_token_max_age_seconds,omitempty"` - AuthenticationMethodEnabled bool `json:"authentication_method_enabled"` - AuthenticationMethodId string `json:"authentication_method_id"` - AuthenticationMethodName *string `json:"authentication_method_name,omitempty"` - AuthenticationMethodType AuthenticationMethodType `json:"authentication_method_type"` - AutoJoinTeamId string `json:"auto_join_team_id"` - AutoJoinUserGroupId string `json:"auto_join_user_group_id"` - CreateTime time.Time `json:"create_time"` - DeleteTime time.Time `json:"delete_time"` - OrganizationId *string `json:"organization_id,omitempty"` - SamlAcsUrl *string `json:"saml_acs_url,omitempty"` - SamlAssertionSignedEnabled *bool `json:"saml_assertion_signed_enabled,omitempty"` - SamlAuthnRequestsSignedEnabled *bool `json:"saml_authn_requests_signed_enabled,omitempty"` - SamlCert SamlCertType `json:"saml_cert,omitempty"` - SamlCertificate *string `json:"saml_certificate,omitempty"` - SamlCertificateIssuer *string `json:"saml_certificate_issuer,omitempty"` - SamlCertificateNotValidAfter *string `json:"saml_certificate_not_valid_after,omitempty"` - SamlCertificateNotValidBefore *string `json:"saml_certificate_not_valid_before,omitempty"` - SamlCertificateSubject *string `json:"saml_certificate_subject,omitempty"` - SamlDigestAlgorithm SamlDigestAlgorithmType `json:"saml_digest_algorithm,omitempty"` - SamlEntityId *string `json:"saml_entity_id,omitempty"` - SamlFieldMapping *SamlFieldMappingOut `json:"saml_field_mapping,omitempty"` - SamlIdpLoginAllowed *bool `json:"saml_idp_login_allowed,omitempty"` - SamlIdpUrl *string `json:"saml_idp_url,omitempty"` - SamlMetadataUrl *string `json:"saml_metadata_url,omitempty"` - SamlRequestedAuthnContextEnabled *bool `json:"saml_requested_authn_context_enabled,omitempty"` - SamlSignatureAlgorithm SamlSignatureAlgorithmType `json:"saml_signature_algorithm,omitempty"` - SamlSpCertificate *string `json:"saml_sp_certificate,omitempty"` - SamlVariant SamlVariantType `json:"saml_variant,omitempty"` - ScimEnabled *bool `json:"scim_enabled,omitempty"` - ScimUrl *string `json:"scim_url,omitempty"` - State AuthenticationMethodStateType `json:"state"` - UpdateTime time.Time `json:"update_time"` + AccountId string `json:"account_id"` // Account ID + AuthTokenExtendWhenUsed *bool `json:"auth_token_extend_when_used,omitempty"` // Extend authentication token validity when used + AuthTokenMaxAgeSeconds *int `json:"auth_token_max_age_seconds,omitempty"` // Auth Token Max Age Seconds + AuthenticationMethodEnabled bool `json:"authentication_method_enabled"` // If true, authentication method can be used to access account/projects in account. If false, authentication method can still be used to sign in + AuthenticationMethodId string `json:"authentication_method_id"` // Authentication Method ID + AuthenticationMethodName *string `json:"authentication_method_name,omitempty"` // Authentication Method Name + AuthenticationMethodType AuthenticationMethodType `json:"authentication_method_type"` // Authentication method type + AutoJoinTeamId string `json:"auto_join_team_id"` // Automatically add users to a team, when user signs up using this authentication method + AutoJoinUserGroupId string `json:"auto_join_user_group_id"` // Automatically add users to a group, when user signs up using this authentication method + CreateTime time.Time `json:"create_time"` // Create Time + DeleteTime time.Time `json:"delete_time"` // Delete Time + OrganizationId *string `json:"organization_id,omitempty"` // Organization ID + SamlAcsUrl *string `json:"saml_acs_url,omitempty"` // Saml Acs Url + SamlAssertionSignedEnabled *bool `json:"saml_assertion_signed_enabled,omitempty"` // Set to 'true' to enable WantAssertionsSigned + SamlAuthnRequestsSignedEnabled *bool `json:"saml_authn_requests_signed_enabled,omitempty"` // Set to 'true' to enable AuthnRequestsSigned + SamlCert SamlCertType `json:"saml_cert,omitempty"` // SAMLVariant + SamlCertificate *string `json:"saml_certificate,omitempty"` // Identity provider's certificate + SamlCertificateIssuer *string `json:"saml_certificate_issuer,omitempty"` // Saml Certificate Issuer + SamlCertificateNotValidAfter *string `json:"saml_certificate_not_valid_after,omitempty"` // Saml Certificate Not Valid After + SamlCertificateNotValidBefore *string `json:"saml_certificate_not_valid_before,omitempty"` // Saml Certificate Not Valid Before + SamlCertificateSubject *string `json:"saml_certificate_subject,omitempty"` // Saml Certificate Subject + SamlDigestAlgorithm SamlDigestAlgorithmType `json:"saml_digest_algorithm,omitempty"` // Digest algorithm. This is an advanced option that typically does not need to be set. + SamlEntityId *string `json:"saml_entity_id,omitempty"` // Saml Entity ID + SamlFieldMapping *SamlFieldMappingOut `json:"saml_field_mapping,omitempty"` // SAMLFieldMapping + SamlIdpLoginAllowed *bool `json:"saml_idp_login_allowed,omitempty"` // Set to 'true' to enable IdP initiated login + SamlIdpUrl *string `json:"saml_idp_url,omitempty"` // Saml Idp Url + SamlMetadataUrl *string `json:"saml_metadata_url,omitempty"` // Saml Metadata Url + SamlRequestedAuthnContextEnabled *bool `json:"saml_requested_authn_context_enabled,omitempty"` // Set to 'false' to disable RequestedAuthnContext + SamlSignatureAlgorithm SamlSignatureAlgorithmType `json:"saml_signature_algorithm,omitempty"` // SAMLSignatureAlgorithm + SamlSpCertificate *string `json:"saml_sp_certificate,omitempty"` // Saml Sp Certificate + SamlVariant SamlVariantType `json:"saml_variant,omitempty"` // SAMLVariant + ScimEnabled *bool `json:"scim_enabled,omitempty"` // SCIM API enabled + ScimUrl *string `json:"scim_url,omitempty"` // Scim Url + State AuthenticationMethodStateType `json:"state"` // AuthenticationMethodState + UpdateTime time.Time `json:"update_time"` // Update Time } + +// AccountAuthenticationMethodGetOut AuthenticationMethod type AccountAuthenticationMethodGetOut struct { - AccountId string `json:"account_id"` - AuthTokenExtendWhenUsed *bool `json:"auth_token_extend_when_used,omitempty"` - AuthTokenMaxAgeSeconds *int `json:"auth_token_max_age_seconds,omitempty"` - AuthenticationMethodEnabled bool `json:"authentication_method_enabled"` - AuthenticationMethodId string `json:"authentication_method_id"` - AuthenticationMethodName *string `json:"authentication_method_name,omitempty"` - AuthenticationMethodType AuthenticationMethodType `json:"authentication_method_type"` - AutoJoinTeamId string `json:"auto_join_team_id"` - AutoJoinUserGroupId string `json:"auto_join_user_group_id"` - CreateTime time.Time `json:"create_time"` - DeleteTime time.Time `json:"delete_time"` - OrganizationId *string `json:"organization_id,omitempty"` - SamlAcsUrl *string `json:"saml_acs_url,omitempty"` - SamlAssertionSignedEnabled *bool `json:"saml_assertion_signed_enabled,omitempty"` - SamlAuthnRequestsSignedEnabled *bool `json:"saml_authn_requests_signed_enabled,omitempty"` - SamlCert SamlCertType `json:"saml_cert,omitempty"` - SamlCertificate *string `json:"saml_certificate,omitempty"` - SamlCertificateIssuer *string `json:"saml_certificate_issuer,omitempty"` - SamlCertificateNotValidAfter *string `json:"saml_certificate_not_valid_after,omitempty"` - SamlCertificateNotValidBefore *string `json:"saml_certificate_not_valid_before,omitempty"` - SamlCertificateSubject *string `json:"saml_certificate_subject,omitempty"` - SamlDigestAlgorithm SamlDigestAlgorithmType `json:"saml_digest_algorithm,omitempty"` - SamlEntityId *string `json:"saml_entity_id,omitempty"` - SamlFieldMapping *SamlFieldMappingOut `json:"saml_field_mapping,omitempty"` - SamlIdpLoginAllowed *bool `json:"saml_idp_login_allowed,omitempty"` - SamlIdpUrl *string `json:"saml_idp_url,omitempty"` - SamlMetadataUrl *string `json:"saml_metadata_url,omitempty"` - SamlRequestedAuthnContextEnabled *bool `json:"saml_requested_authn_context_enabled,omitempty"` - SamlSignatureAlgorithm SamlSignatureAlgorithmType `json:"saml_signature_algorithm,omitempty"` - SamlSpCertificate *string `json:"saml_sp_certificate,omitempty"` - SamlVariant SamlVariantType `json:"saml_variant,omitempty"` - ScimEnabled *bool `json:"scim_enabled,omitempty"` - ScimUrl *string `json:"scim_url,omitempty"` - State AuthenticationMethodStateType `json:"state"` - UpdateTime time.Time `json:"update_time"` + AccountId string `json:"account_id"` // Account ID + AuthTokenExtendWhenUsed *bool `json:"auth_token_extend_when_used,omitempty"` // Extend authentication token validity when used + AuthTokenMaxAgeSeconds *int `json:"auth_token_max_age_seconds,omitempty"` // Auth Token Max Age Seconds + AuthenticationMethodEnabled bool `json:"authentication_method_enabled"` // If true, authentication method can be used to access account/projects in account. If false, authentication method can still be used to sign in + AuthenticationMethodId string `json:"authentication_method_id"` // Authentication Method ID + AuthenticationMethodName *string `json:"authentication_method_name,omitempty"` // Authentication Method Name + AuthenticationMethodType AuthenticationMethodType `json:"authentication_method_type"` // Authentication method type + AutoJoinTeamId string `json:"auto_join_team_id"` // Automatically add users to a team, when user signs up using this authentication method + AutoJoinUserGroupId string `json:"auto_join_user_group_id"` // Automatically add users to a group, when user signs up using this authentication method + CreateTime time.Time `json:"create_time"` // Create Time + DeleteTime time.Time `json:"delete_time"` // Delete Time + OrganizationId *string `json:"organization_id,omitempty"` // Organization ID + SamlAcsUrl *string `json:"saml_acs_url,omitempty"` // Saml Acs Url + SamlAssertionSignedEnabled *bool `json:"saml_assertion_signed_enabled,omitempty"` // Set to 'true' to enable WantAssertionsSigned + SamlAuthnRequestsSignedEnabled *bool `json:"saml_authn_requests_signed_enabled,omitempty"` // Set to 'true' to enable AuthnRequestsSigned + SamlCert SamlCertType `json:"saml_cert,omitempty"` // SAMLVariant + SamlCertificate *string `json:"saml_certificate,omitempty"` // Identity provider's certificate + SamlCertificateIssuer *string `json:"saml_certificate_issuer,omitempty"` // Saml Certificate Issuer + SamlCertificateNotValidAfter *string `json:"saml_certificate_not_valid_after,omitempty"` // Saml Certificate Not Valid After + SamlCertificateNotValidBefore *string `json:"saml_certificate_not_valid_before,omitempty"` // Saml Certificate Not Valid Before + SamlCertificateSubject *string `json:"saml_certificate_subject,omitempty"` // Saml Certificate Subject + SamlDigestAlgorithm SamlDigestAlgorithmType `json:"saml_digest_algorithm,omitempty"` // Digest algorithm. This is an advanced option that typically does not need to be set. + SamlEntityId *string `json:"saml_entity_id,omitempty"` // Saml Entity ID + SamlFieldMapping *SamlFieldMappingOut `json:"saml_field_mapping,omitempty"` // SAMLFieldMapping + SamlIdpLoginAllowed *bool `json:"saml_idp_login_allowed,omitempty"` // Set to 'true' to enable IdP initiated login + SamlIdpUrl *string `json:"saml_idp_url,omitempty"` // Saml Idp Url + SamlMetadataUrl *string `json:"saml_metadata_url,omitempty"` // Saml Metadata Url + SamlRequestedAuthnContextEnabled *bool `json:"saml_requested_authn_context_enabled,omitempty"` // Set to 'false' to disable RequestedAuthnContext + SamlSignatureAlgorithm SamlSignatureAlgorithmType `json:"saml_signature_algorithm,omitempty"` // SAMLSignatureAlgorithm + SamlSpCertificate *string `json:"saml_sp_certificate,omitempty"` // Saml Sp Certificate + SamlVariant SamlVariantType `json:"saml_variant,omitempty"` // SAMLVariant + ScimEnabled *bool `json:"scim_enabled,omitempty"` // SCIM API enabled + ScimUrl *string `json:"scim_url,omitempty"` // Scim Url + State AuthenticationMethodStateType `json:"state"` // AuthenticationMethodState + UpdateTime time.Time `json:"update_time"` // Update Time } + +// AccountAuthenticationMethodUpdateIn AccountAuthenticationMethodUpdateRequestBody type AccountAuthenticationMethodUpdateIn struct { - AuthTokenExtendWhenUsed *bool `json:"auth_token_extend_when_used,omitempty"` - AuthTokenMaxAgeSeconds *int `json:"auth_token_max_age_seconds,omitempty"` - AuthenticationMethodEnabled *bool `json:"authentication_method_enabled,omitempty"` - AuthenticationMethodName *string `json:"authentication_method_name,omitempty"` - AutoJoinTeamId *string `json:"auto_join_team_id,omitempty"` - AutoJoinUserGroupId *string `json:"auto_join_user_group_id,omitempty"` - SamlAssertionSignedEnabled *bool `json:"saml_assertion_signed_enabled,omitempty"` - SamlAuthnRequestsSignedEnabled *bool `json:"saml_authn_requests_signed_enabled,omitempty"` - SamlCertificate *string `json:"saml_certificate,omitempty"` - SamlDigestAlgorithm SamlDigestAlgorithmType `json:"saml_digest_algorithm,omitempty"` - SamlEntityId *string `json:"saml_entity_id,omitempty"` - SamlFieldMapping *SamlFieldMappingIn `json:"saml_field_mapping,omitempty"` - SamlIdpLoginAllowed *bool `json:"saml_idp_login_allowed,omitempty"` - SamlIdpUrl *string `json:"saml_idp_url,omitempty"` - SamlRequestedAuthnContextEnabled *bool `json:"saml_requested_authn_context_enabled,omitempty"` - SamlSignatureAlgorithm SamlSignatureAlgorithmType `json:"saml_signature_algorithm,omitempty"` - SamlVariant SamlVariantType `json:"saml_variant,omitempty"` - ScimEnabled *bool `json:"scim_enabled,omitempty"` + AuthTokenExtendWhenUsed *bool `json:"auth_token_extend_when_used,omitempty"` // Extend authentication token validity when used + AuthTokenMaxAgeSeconds *int `json:"auth_token_max_age_seconds,omitempty"` // Auth Token Max Age Seconds + AuthenticationMethodEnabled *bool `json:"authentication_method_enabled,omitempty"` // If true, authentication method can be used to access account/projects in account. If false, authentication method can still be used to sign in + AuthenticationMethodName *string `json:"authentication_method_name,omitempty"` // Authentication Method Name + AutoJoinTeamId *string `json:"auto_join_team_id,omitempty"` // Automatically add users to a team, when user signs up using this authentication method + AutoJoinUserGroupId *string `json:"auto_join_user_group_id,omitempty"` // Automatically add users to a group, when user signs up using this authentication method + SamlAssertionSignedEnabled *bool `json:"saml_assertion_signed_enabled,omitempty"` // Set to 'true' to enable WantAssertionsSigned + SamlAuthnRequestsSignedEnabled *bool `json:"saml_authn_requests_signed_enabled,omitempty"` // Set to 'true' to enable AuthnRequestsSigned + SamlCertificate *string `json:"saml_certificate,omitempty"` // Identity provider's certificate + SamlDigestAlgorithm SamlDigestAlgorithmType `json:"saml_digest_algorithm,omitempty"` // Digest algorithm. This is an advanced option that typically does not need to be set. + SamlEntityId *string `json:"saml_entity_id,omitempty"` // Saml Entity ID + SamlFieldMapping *SamlFieldMappingIn `json:"saml_field_mapping,omitempty"` // SAMLFieldMapping + SamlIdpLoginAllowed *bool `json:"saml_idp_login_allowed,omitempty"` // Set to 'true' to enable IdP initiated login + SamlIdpUrl *string `json:"saml_idp_url,omitempty"` // Saml Idp Url + SamlRequestedAuthnContextEnabled *bool `json:"saml_requested_authn_context_enabled,omitempty"` // Set to 'false' to disable RequestedAuthnContext + SamlSignatureAlgorithm SamlSignatureAlgorithmType `json:"saml_signature_algorithm,omitempty"` // SAMLSignatureAlgorithm + SamlVariant SamlVariantType `json:"saml_variant,omitempty"` // SAMLVariant + ScimEnabled *bool `json:"scim_enabled,omitempty"` // SCIM enabled } + +// AccountAuthenticationMethodUpdateOut AuthenticationMethod type AccountAuthenticationMethodUpdateOut struct { - AccountId string `json:"account_id"` - AuthTokenExtendWhenUsed *bool `json:"auth_token_extend_when_used,omitempty"` - AuthTokenMaxAgeSeconds *int `json:"auth_token_max_age_seconds,omitempty"` - AuthenticationMethodEnabled bool `json:"authentication_method_enabled"` - AuthenticationMethodId string `json:"authentication_method_id"` - AuthenticationMethodName *string `json:"authentication_method_name,omitempty"` - AuthenticationMethodType AuthenticationMethodType `json:"authentication_method_type"` - AutoJoinTeamId string `json:"auto_join_team_id"` - AutoJoinUserGroupId string `json:"auto_join_user_group_id"` - CreateTime time.Time `json:"create_time"` - DeleteTime time.Time `json:"delete_time"` - OrganizationId *string `json:"organization_id,omitempty"` - SamlAcsUrl *string `json:"saml_acs_url,omitempty"` - SamlAssertionSignedEnabled *bool `json:"saml_assertion_signed_enabled,omitempty"` - SamlAuthnRequestsSignedEnabled *bool `json:"saml_authn_requests_signed_enabled,omitempty"` - SamlCert SamlCertType `json:"saml_cert,omitempty"` - SamlCertificate *string `json:"saml_certificate,omitempty"` - SamlCertificateIssuer *string `json:"saml_certificate_issuer,omitempty"` - SamlCertificateNotValidAfter *string `json:"saml_certificate_not_valid_after,omitempty"` - SamlCertificateNotValidBefore *string `json:"saml_certificate_not_valid_before,omitempty"` - SamlCertificateSubject *string `json:"saml_certificate_subject,omitempty"` - SamlDigestAlgorithm SamlDigestAlgorithmType `json:"saml_digest_algorithm,omitempty"` - SamlEntityId *string `json:"saml_entity_id,omitempty"` - SamlFieldMapping *SamlFieldMappingOut `json:"saml_field_mapping,omitempty"` - SamlIdpLoginAllowed *bool `json:"saml_idp_login_allowed,omitempty"` - SamlIdpUrl *string `json:"saml_idp_url,omitempty"` - SamlMetadataUrl *string `json:"saml_metadata_url,omitempty"` - SamlRequestedAuthnContextEnabled *bool `json:"saml_requested_authn_context_enabled,omitempty"` - SamlSignatureAlgorithm SamlSignatureAlgorithmType `json:"saml_signature_algorithm,omitempty"` - SamlSpCertificate *string `json:"saml_sp_certificate,omitempty"` - SamlVariant SamlVariantType `json:"saml_variant,omitempty"` - ScimEnabled *bool `json:"scim_enabled,omitempty"` - ScimUrl *string `json:"scim_url,omitempty"` - State AuthenticationMethodStateType `json:"state"` - UpdateTime time.Time `json:"update_time"` + AccountId string `json:"account_id"` // Account ID + AuthTokenExtendWhenUsed *bool `json:"auth_token_extend_when_used,omitempty"` // Extend authentication token validity when used + AuthTokenMaxAgeSeconds *int `json:"auth_token_max_age_seconds,omitempty"` // Auth Token Max Age Seconds + AuthenticationMethodEnabled bool `json:"authentication_method_enabled"` // If true, authentication method can be used to access account/projects in account. If false, authentication method can still be used to sign in + AuthenticationMethodId string `json:"authentication_method_id"` // Authentication Method ID + AuthenticationMethodName *string `json:"authentication_method_name,omitempty"` // Authentication Method Name + AuthenticationMethodType AuthenticationMethodType `json:"authentication_method_type"` // Authentication method type + AutoJoinTeamId string `json:"auto_join_team_id"` // Automatically add users to a team, when user signs up using this authentication method + AutoJoinUserGroupId string `json:"auto_join_user_group_id"` // Automatically add users to a group, when user signs up using this authentication method + CreateTime time.Time `json:"create_time"` // Create Time + DeleteTime time.Time `json:"delete_time"` // Delete Time + OrganizationId *string `json:"organization_id,omitempty"` // Organization ID + SamlAcsUrl *string `json:"saml_acs_url,omitempty"` // Saml Acs Url + SamlAssertionSignedEnabled *bool `json:"saml_assertion_signed_enabled,omitempty"` // Set to 'true' to enable WantAssertionsSigned + SamlAuthnRequestsSignedEnabled *bool `json:"saml_authn_requests_signed_enabled,omitempty"` // Set to 'true' to enable AuthnRequestsSigned + SamlCert SamlCertType `json:"saml_cert,omitempty"` // SAMLVariant + SamlCertificate *string `json:"saml_certificate,omitempty"` // Identity provider's certificate + SamlCertificateIssuer *string `json:"saml_certificate_issuer,omitempty"` // Saml Certificate Issuer + SamlCertificateNotValidAfter *string `json:"saml_certificate_not_valid_after,omitempty"` // Saml Certificate Not Valid After + SamlCertificateNotValidBefore *string `json:"saml_certificate_not_valid_before,omitempty"` // Saml Certificate Not Valid Before + SamlCertificateSubject *string `json:"saml_certificate_subject,omitempty"` // Saml Certificate Subject + SamlDigestAlgorithm SamlDigestAlgorithmType `json:"saml_digest_algorithm,omitempty"` // Digest algorithm. This is an advanced option that typically does not need to be set. + SamlEntityId *string `json:"saml_entity_id,omitempty"` // Saml Entity ID + SamlFieldMapping *SamlFieldMappingOut `json:"saml_field_mapping,omitempty"` // SAMLFieldMapping + SamlIdpLoginAllowed *bool `json:"saml_idp_login_allowed,omitempty"` // Set to 'true' to enable IdP initiated login + SamlIdpUrl *string `json:"saml_idp_url,omitempty"` // Saml Idp Url + SamlMetadataUrl *string `json:"saml_metadata_url,omitempty"` // Saml Metadata Url + SamlRequestedAuthnContextEnabled *bool `json:"saml_requested_authn_context_enabled,omitempty"` // Set to 'false' to disable RequestedAuthnContext + SamlSignatureAlgorithm SamlSignatureAlgorithmType `json:"saml_signature_algorithm,omitempty"` // SAMLSignatureAlgorithm + SamlSpCertificate *string `json:"saml_sp_certificate,omitempty"` // Saml Sp Certificate + SamlVariant SamlVariantType `json:"saml_variant,omitempty"` // SAMLVariant + ScimEnabled *bool `json:"scim_enabled,omitempty"` // SCIM API enabled + ScimUrl *string `json:"scim_url,omitempty"` // Scim Url + State AuthenticationMethodStateType `json:"state"` // AuthenticationMethodState + UpdateTime time.Time `json:"update_time"` // Update Time } type AuthenticationMethodOut struct { - AccountId string `json:"account_id"` - AuthTokenExtendWhenUsed *bool `json:"auth_token_extend_when_used,omitempty"` - AuthTokenMaxAgeSeconds *int `json:"auth_token_max_age_seconds,omitempty"` - AuthenticationMethodEnabled bool `json:"authentication_method_enabled"` - AuthenticationMethodId string `json:"authentication_method_id"` - AuthenticationMethodName *string `json:"authentication_method_name,omitempty"` - AuthenticationMethodType AuthenticationMethodType `json:"authentication_method_type"` - AutoJoinTeamId string `json:"auto_join_team_id"` - AutoJoinUserGroupId string `json:"auto_join_user_group_id"` - CreateTime time.Time `json:"create_time"` - DeleteTime time.Time `json:"delete_time"` - OrganizationId *string `json:"organization_id,omitempty"` - SamlAcsUrl *string `json:"saml_acs_url,omitempty"` - SamlAssertionSignedEnabled *bool `json:"saml_assertion_signed_enabled,omitempty"` - SamlAuthnRequestsSignedEnabled *bool `json:"saml_authn_requests_signed_enabled,omitempty"` - SamlCert SamlCertType `json:"saml_cert,omitempty"` - SamlCertificate *string `json:"saml_certificate,omitempty"` - SamlCertificateIssuer *string `json:"saml_certificate_issuer,omitempty"` - SamlCertificateNotValidAfter *string `json:"saml_certificate_not_valid_after,omitempty"` - SamlCertificateNotValidBefore *string `json:"saml_certificate_not_valid_before,omitempty"` - SamlCertificateSubject *string `json:"saml_certificate_subject,omitempty"` - SamlDigestAlgorithm SamlDigestAlgorithmType `json:"saml_digest_algorithm,omitempty"` - SamlEntityId *string `json:"saml_entity_id,omitempty"` - SamlFieldMapping *SamlFieldMappingOut `json:"saml_field_mapping,omitempty"` - SamlIdpLoginAllowed *bool `json:"saml_idp_login_allowed,omitempty"` - SamlIdpUrl *string `json:"saml_idp_url,omitempty"` - SamlMetadataUrl *string `json:"saml_metadata_url,omitempty"` - SamlRequestedAuthnContextEnabled *bool `json:"saml_requested_authn_context_enabled,omitempty"` - SamlSignatureAlgorithm SamlSignatureAlgorithmType `json:"saml_signature_algorithm,omitempty"` - SamlSpCertificate *string `json:"saml_sp_certificate,omitempty"` - SamlVariant SamlVariantType `json:"saml_variant,omitempty"` - ScimEnabled *bool `json:"scim_enabled,omitempty"` - ScimUrl *string `json:"scim_url,omitempty"` - State AuthenticationMethodStateType `json:"state"` - UpdateTime time.Time `json:"update_time"` + AccountId string `json:"account_id"` // Account ID + AuthTokenExtendWhenUsed *bool `json:"auth_token_extend_when_used,omitempty"` // Extend authentication token validity when used + AuthTokenMaxAgeSeconds *int `json:"auth_token_max_age_seconds,omitempty"` // Auth Token Max Age Seconds + AuthenticationMethodEnabled bool `json:"authentication_method_enabled"` // If true, authentication method can be used to access account/projects in account. If false, authentication method can still be used to sign in + AuthenticationMethodId string `json:"authentication_method_id"` // Authentication Method ID + AuthenticationMethodName *string `json:"authentication_method_name,omitempty"` // Authentication Method Name + AuthenticationMethodType AuthenticationMethodType `json:"authentication_method_type"` // Authentication method type + AutoJoinTeamId string `json:"auto_join_team_id"` // Automatically add users to a team, when user signs up using this authentication method + AutoJoinUserGroupId string `json:"auto_join_user_group_id"` // Automatically add users to a group, when user signs up using this authentication method + CreateTime time.Time `json:"create_time"` // Create Time + DeleteTime time.Time `json:"delete_time"` // Delete Time + OrganizationId *string `json:"organization_id,omitempty"` // Organization ID + SamlAcsUrl *string `json:"saml_acs_url,omitempty"` // Saml Acs Url + SamlAssertionSignedEnabled *bool `json:"saml_assertion_signed_enabled,omitempty"` // Set to 'true' to enable WantAssertionsSigned + SamlAuthnRequestsSignedEnabled *bool `json:"saml_authn_requests_signed_enabled,omitempty"` // Set to 'true' to enable AuthnRequestsSigned + SamlCert SamlCertType `json:"saml_cert,omitempty"` // SAMLVariant + SamlCertificate *string `json:"saml_certificate,omitempty"` // Identity provider's certificate + SamlCertificateIssuer *string `json:"saml_certificate_issuer,omitempty"` // Saml Certificate Issuer + SamlCertificateNotValidAfter *string `json:"saml_certificate_not_valid_after,omitempty"` // Saml Certificate Not Valid After + SamlCertificateNotValidBefore *string `json:"saml_certificate_not_valid_before,omitempty"` // Saml Certificate Not Valid Before + SamlCertificateSubject *string `json:"saml_certificate_subject,omitempty"` // Saml Certificate Subject + SamlDigestAlgorithm SamlDigestAlgorithmType `json:"saml_digest_algorithm,omitempty"` // Digest algorithm. This is an advanced option that typically does not need to be set. + SamlEntityId *string `json:"saml_entity_id,omitempty"` // Saml Entity ID + SamlFieldMapping *SamlFieldMappingOut `json:"saml_field_mapping,omitempty"` // SAMLFieldMapping + SamlIdpLoginAllowed *bool `json:"saml_idp_login_allowed,omitempty"` // Set to 'true' to enable IdP initiated login + SamlIdpUrl *string `json:"saml_idp_url,omitempty"` // Saml Idp Url + SamlMetadataUrl *string `json:"saml_metadata_url,omitempty"` // Saml Metadata Url + SamlRequestedAuthnContextEnabled *bool `json:"saml_requested_authn_context_enabled,omitempty"` // Set to 'false' to disable RequestedAuthnContext + SamlSignatureAlgorithm SamlSignatureAlgorithmType `json:"saml_signature_algorithm,omitempty"` // SAMLSignatureAlgorithm + SamlSpCertificate *string `json:"saml_sp_certificate,omitempty"` // Saml Sp Certificate + SamlVariant SamlVariantType `json:"saml_variant,omitempty"` // SAMLVariant + ScimEnabled *bool `json:"scim_enabled,omitempty"` // SCIM API enabled + ScimUrl *string `json:"scim_url,omitempty"` // Scim Url + State AuthenticationMethodStateType `json:"state"` // AuthenticationMethodState + UpdateTime time.Time `json:"update_time"` // Update Time } type AuthenticationMethodStateType string @@ -320,7 +329,7 @@ func AuthenticationMethodTypeChoices() []string { } type LinkedDomainIn struct { - DomainId string `json:"domain_id"` + DomainId string `json:"domain_id"` // Domain ID } type SamlCertType string @@ -345,19 +354,22 @@ func SamlDigestAlgorithmTypeChoices() []string { return []string{"sha1", "sha256", "sha384", "sha512"} } +// SamlFieldMappingIn SAMLFieldMapping type SamlFieldMappingIn struct { - Email *string `json:"email,omitempty"` - FirstName *string `json:"first_name,omitempty"` - Identity *string `json:"identity,omitempty"` - LastName *string `json:"last_name,omitempty"` - RealName *string `json:"real_name,omitempty"` + Email *string `json:"email,omitempty"` // Field name for user email + FirstName *string `json:"first_name,omitempty"` // Field name for user's first name + Identity *string `json:"identity,omitempty"` // Field name for user's identity. This field must always exist in responses, and must be immutable and unique. Contents of this field are used to identify the user. Using user ID (such as unix user ID) is highly recommended, as email address may change, requiring relinking user to Aiven user. + LastName *string `json:"last_name,omitempty"` // Field name for user's lastname + RealName *string `json:"real_name,omitempty"` // Field name for user's full name. If specified, first_name and last_name mappings are ignored } + +// SamlFieldMappingOut SAMLFieldMapping type SamlFieldMappingOut struct { - Email *string `json:"email,omitempty"` - FirstName *string `json:"first_name,omitempty"` - Identity *string `json:"identity,omitempty"` - LastName *string `json:"last_name,omitempty"` - RealName *string `json:"real_name,omitempty"` + Email *string `json:"email,omitempty"` // Field name for user email + FirstName *string `json:"first_name,omitempty"` // Field name for user's first name + Identity *string `json:"identity,omitempty"` // Field name for user's identity. This field must always exist in responses, and must be immutable and unique. Contents of this field are used to identify the user. Using user ID (such as unix user ID) is highly recommended, as email address may change, requiring relinking user to Aiven user. + LastName *string `json:"last_name,omitempty"` // Field name for user's lastname + RealName *string `json:"real_name,omitempty"` // Field name for user's full name. If specified, first_name and last_name mappings are ignored } type SamlSignatureAlgorithmType string @@ -383,15 +395,22 @@ func SamlVariantTypeChoices() []string { return []string{"adfs"} } +// accountAuthenticationMethodCreateOut AccountAuthenticationMethodCreateResponse type accountAuthenticationMethodCreateOut struct { - AuthenticationMethod AccountAuthenticationMethodCreateOut `json:"authentication_method"` + AuthenticationMethod AccountAuthenticationMethodCreateOut `json:"authentication_method"` // AuthenticationMethod } + +// accountAuthenticationMethodGetOut AccountAuthenticationMethodGetResponse type accountAuthenticationMethodGetOut struct { - AuthenticationMethod AccountAuthenticationMethodGetOut `json:"authentication_method"` + AuthenticationMethod AccountAuthenticationMethodGetOut `json:"authentication_method"` // AuthenticationMethod } + +// accountAuthenticationMethodUpdateOut AccountAuthenticationMethodUpdateResponse type accountAuthenticationMethodUpdateOut struct { - AuthenticationMethod AccountAuthenticationMethodUpdateOut `json:"authentication_method"` + AuthenticationMethod AccountAuthenticationMethodUpdateOut `json:"authentication_method"` // AuthenticationMethod } + +// accountAuthenticationMethodsListOut AccountAuthenticationMethodsListResponse type accountAuthenticationMethodsListOut struct { - AuthenticationMethods []AuthenticationMethodOut `json:"authentication_methods"` + AuthenticationMethods []AuthenticationMethodOut `json:"authentication_methods"` // Authentication Methods } diff --git a/handler/accountteam/accountteam.go b/handler/accountteam/accountteam.go index 00d6ce2..12045cb 100644 --- a/handler/accountteam/accountteam.go +++ b/handler/accountteam/accountteam.go @@ -146,44 +146,52 @@ func (h *AccountTeamHandler) AccountTeamUpdate(ctx context.Context, accountId st } type AccountInviteOut struct { - AccountId string `json:"account_id"` - AccountName string `json:"account_name"` - CreateTime time.Time `json:"create_time"` - InvitedByUserEmail string `json:"invited_by_user_email"` - TeamId string `json:"team_id"` - TeamName string `json:"team_name"` - UserEmail string `json:"user_email"` + AccountId string `json:"account_id"` // Account ID + AccountName string `json:"account_name"` // Account name + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + InvitedByUserEmail string `json:"invited_by_user_email"` // User email address + TeamId string `json:"team_id"` // Team ID + TeamName string `json:"team_name"` // Team name + UserEmail string `json:"user_email"` // User email address } + +// AccountTeamGetOut Account Team details type AccountTeamGetOut struct { - AccountId *string `json:"account_id,omitempty"` - CreateTime *time.Time `json:"create_time,omitempty"` - TeamId string `json:"team_id"` - TeamName string `json:"team_name"` - UpdateTime *time.Time `json:"update_time,omitempty"` + AccountId *string `json:"account_id,omitempty"` // Account ID + CreateTime *time.Time `json:"create_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC + TeamId string `json:"team_id"` // Team ID + TeamName string `json:"team_name"` // Team name + UpdateTime *time.Time `json:"update_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC } + +// AccountTeamProjectAssociateIn AccountTeamProjectAssociateRequestBody type AccountTeamProjectAssociateIn struct { - TeamType TeamType `json:"team_type"` + TeamType TeamType `json:"team_type"` // Team type (permission level) } + +// AccountTeamUpdateIn AccountTeamUpdateRequestBody type AccountTeamUpdateIn struct { - TeamName string `json:"team_name"` + TeamName string `json:"team_name"` // Team name } + +// AccountTeamUpdateOut Account Team details type AccountTeamUpdateOut struct { - AccountId *string `json:"account_id,omitempty"` - CreateTime *time.Time `json:"create_time,omitempty"` - TeamId string `json:"team_id"` - TeamName string `json:"team_name"` - UpdateTime *time.Time `json:"update_time,omitempty"` + AccountId *string `json:"account_id,omitempty"` // Account ID + CreateTime *time.Time `json:"create_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC + TeamId string `json:"team_id"` // Team ID + TeamName string `json:"team_name"` // Team name + UpdateTime *time.Time `json:"update_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC } type ProjectOut struct { - ProjectName string `json:"project_name"` - TeamType TeamType `json:"team_type"` + ProjectName string `json:"project_name"` // Project name + TeamType TeamType `json:"team_type"` // Team type (permission level) } type TeamOut struct { - AccountId *string `json:"account_id,omitempty"` - CreateTime *time.Time `json:"create_time,omitempty"` - TeamId string `json:"team_id"` - TeamName string `json:"team_name"` - UpdateTime *time.Time `json:"update_time,omitempty"` + AccountId *string `json:"account_id,omitempty"` // Account ID + CreateTime *time.Time `json:"create_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC + TeamId string `json:"team_id"` // Team ID + TeamName string `json:"team_name"` // Team name + UpdateTime *time.Time `json:"update_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC } type TeamType string @@ -198,18 +206,27 @@ func TeamTypeChoices() []string { return []string{"admin", "operator", "developer", "read_only"} } +// accountTeamGetOut AccountTeamGetResponse type accountTeamGetOut struct { - Team AccountTeamGetOut `json:"team"` + Team AccountTeamGetOut `json:"team"` // Account Team details } + +// accountTeamInvitesListOut AccountTeamInvitesListResponse type accountTeamInvitesListOut struct { - AccountInvites []AccountInviteOut `json:"account_invites"` + AccountInvites []AccountInviteOut `json:"account_invites"` // List of invites } + +// accountTeamListOut AccountTeamListResponse type accountTeamListOut struct { - Teams []TeamOut `json:"teams"` + Teams []TeamOut `json:"teams"` // List of teams } + +// accountTeamProjectListOut AccountTeamProjectListResponse type accountTeamProjectListOut struct { - Projects []ProjectOut `json:"projects"` + Projects []ProjectOut `json:"projects"` // List of projects associated to a team } + +// accountTeamUpdateOut AccountTeamUpdateResponse type accountTeamUpdateOut struct { - Team AccountTeamUpdateOut `json:"team"` + Team AccountTeamUpdateOut `json:"team"` // Account Team details } diff --git a/handler/accountteammember/accountteammember.go b/handler/accountteammember/accountteammember.go index 6cc7d76..81e1d83 100644 --- a/handler/accountteammember/accountteammember.go +++ b/handler/accountteammember/accountteammember.go @@ -81,24 +81,31 @@ func (h *AccountTeamMemberHandler) AccountTeamMembersList(ctx context.Context, a return out.Members, nil } +// AccountTeamMemberVerifyInviteOut Details of verified invite type AccountTeamMemberVerifyInviteOut struct { - UserEmail string `json:"user_email"` + UserEmail string `json:"user_email"` // User email address } + +// AccountTeamMembersInviteIn AccountTeamMembersInviteRequestBody type AccountTeamMembersInviteIn struct { - Email string `json:"email"` + Email string `json:"email"` // User email address } type MemberOut struct { - CreateTime time.Time `json:"create_time"` - RealName string `json:"real_name"` - TeamId string `json:"team_id"` - TeamName string `json:"team_name"` - UpdateTime time.Time `json:"update_time"` - UserEmail string `json:"user_email"` - UserId string `json:"user_id"` + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + RealName string `json:"real_name"` // User real name + TeamId string `json:"team_id"` // Team ID + TeamName string `json:"team_name"` // Team name + UpdateTime time.Time `json:"update_time"` // Timestamp in ISO 8601 format, always in UTC + UserEmail string `json:"user_email"` // User email address + UserId string `json:"user_id"` // User ID } + +// accountTeamMemberVerifyInviteOut AccountTeamMemberVerifyInviteResponse type accountTeamMemberVerifyInviteOut struct { - InviteDetails AccountTeamMemberVerifyInviteOut `json:"invite_details"` + InviteDetails AccountTeamMemberVerifyInviteOut `json:"invite_details"` // Details of verified invite } + +// accountTeamMembersListOut AccountTeamMembersListResponse type accountTeamMembersListOut struct { - Members []MemberOut `json:"members"` + Members []MemberOut `json:"members"` // List of account team members } diff --git a/handler/applicationuser/applicationuser.go b/handler/applicationuser/applicationuser.go index a2cadb6..74b8774 100644 --- a/handler/applicationuser/applicationuser.go +++ b/handler/applicationuser/applicationuser.go @@ -153,66 +153,83 @@ func (h *ApplicationUserHandler) ApplicationUsersList(ctx context.Context, organ return out.ApplicationUsers, nil } +// ApplicationUserAccessTokenCreateIn ApplicationUserAccessTokenCreateRequestBody type ApplicationUserAccessTokenCreateIn struct { Description string `json:"description"` - ExtendWhenUsed *bool `json:"extend_when_used,omitempty"` - MaxAgeSeconds *int `json:"max_age_seconds,omitempty"` - Scopes *[]string `json:"scopes,omitempty"` + ExtendWhenUsed *bool `json:"extend_when_used,omitempty"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified. + MaxAgeSeconds *int `json:"max_age_seconds,omitempty"` // Time the token remains valid since creation (or since last use if extend_when_used is true) + Scopes *[]string `json:"scopes,omitempty"` // Scopes this token is restricted to if specified } + +// ApplicationUserAccessTokenCreateOut ApplicationUserAccessTokenCreateResponse type ApplicationUserAccessTokenCreateOut struct { - FullToken string `json:"full_token"` - TokenPrefix string `json:"token_prefix"` + FullToken string `json:"full_token"` // Full Token + TokenPrefix string `json:"token_prefix"` // Token Prefix } + +// ApplicationUserCreateIn ApplicationUserCreateRequestBody type ApplicationUserCreateIn struct { - IsSuperAdmin *bool `json:"is_super_admin,omitempty"` + IsSuperAdmin *bool `json:"is_super_admin,omitempty"` // Alters super admin state of the organization application user Name string `json:"name"` } + +// ApplicationUserCreateOut ApplicationUserCreateResponse type ApplicationUserCreateOut struct { - IsSuperAdmin bool `json:"is_super_admin"` + IsSuperAdmin bool `json:"is_super_admin"` // Super admin state of the organization application user Name string `json:"name"` - UserEmail string `json:"user_email"` - UserId string `json:"user_id"` + UserEmail string `json:"user_email"` // User Email + UserId string `json:"user_id"` // User ID } + +// ApplicationUserGetOut ApplicationUserGetResponse type ApplicationUserGetOut struct { - IsSuperAdmin bool `json:"is_super_admin"` + IsSuperAdmin bool `json:"is_super_admin"` // Super admin state of the organization application user Name string `json:"name"` - UserEmail string `json:"user_email"` - UserId string `json:"user_id"` + UserEmail string `json:"user_email"` // User Email + UserId string `json:"user_id"` // User ID } type ApplicationUserOut struct { - IsSuperAdmin bool `json:"is_super_admin"` + IsSuperAdmin bool `json:"is_super_admin"` // Super admin state of the organization application user Name string `json:"name"` - UserEmail string `json:"user_email"` - UserId string `json:"user_id"` + UserEmail string `json:"user_email"` // User Email + UserId string `json:"user_id"` // User ID } + +// ApplicationUserUpdateIn ApplicationUserUpdateRequestBody type ApplicationUserUpdateIn struct { - IsSuperAdmin *bool `json:"is_super_admin,omitempty"` + IsSuperAdmin *bool `json:"is_super_admin,omitempty"` // Alters super admin state of the organization application user Name string `json:"name"` } + +// ApplicationUserUpdateOut ApplicationUserUpdateResponse type ApplicationUserUpdateOut struct { - IsSuperAdmin bool `json:"is_super_admin"` + IsSuperAdmin bool `json:"is_super_admin"` // Super admin state of the organization application user Name string `json:"name"` - UserEmail string `json:"user_email"` - UserId string `json:"user_id"` + UserEmail string `json:"user_email"` // User Email + UserId string `json:"user_id"` // User ID } type TokenOut struct { - CreateTime time.Time `json:"create_time"` - CreatedManually bool `json:"created_manually"` - CurrentlyActive bool `json:"currently_active"` + CreateTime time.Time `json:"create_time"` // Create Time + CreatedManually bool `json:"created_manually"` // True for tokens explicitly created via the access_tokens API, false for tokens created via login. + CurrentlyActive bool `json:"currently_active"` // true if API request was made with this access token Description *string `json:"description,omitempty"` - ExpiryTime *time.Time `json:"expiry_time,omitempty"` - ExtendWhenUsed *bool `json:"extend_when_used,omitempty"` - LastIp *string `json:"last_ip,omitempty"` - LastUsedTime *time.Time `json:"last_used_time,omitempty"` - LastUserAgent *string `json:"last_user_agent,omitempty"` - LastUserAgentHumanReadable *string `json:"last_user_agent_human_readable,omitempty"` - MaxAgeSeconds *int `json:"max_age_seconds,omitempty"` - Scopes []string `json:"scopes,omitempty"` - TokenPrefix string `json:"token_prefix"` + ExpiryTime *time.Time `json:"expiry_time,omitempty"` // Timestamp when the access token will expire unless extended, if ever + ExtendWhenUsed *bool `json:"extend_when_used,omitempty"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified. + LastIp *string `json:"last_ip,omitempty"` // IP address the access token was last used from in case it has ever been used + LastUsedTime *time.Time `json:"last_used_time,omitempty"` // Timestamp when the access token was last used, if ever + LastUserAgent *string `json:"last_user_agent,omitempty"` // User agent string of the client that last used the token in case it has ever been used + LastUserAgentHumanReadable *string `json:"last_user_agent_human_readable,omitempty"` // Human readable user agent string of the client that last used the token in case user agent is known + MaxAgeSeconds *int `json:"max_age_seconds,omitempty"` // Time the token remains valid since creation (or since last use if extend_when_used is true) + Scopes []string `json:"scopes,omitempty"` // Scopes this token is restricted to if specified + TokenPrefix string `json:"token_prefix"` // First characters of the actual token value. Full value is only exposed after creation. This value is used when updating or revoking tokens. Note that the value may contain /, + and = characters and must be URL encoded when used (/ => %2F, + => %2B, = => %3D). } + +// applicationUserAccessTokensListOut ApplicationUserAccessTokensListResponse type applicationUserAccessTokensListOut struct { - Tokens []TokenOut `json:"tokens"` + Tokens []TokenOut `json:"tokens"` // Tokens } + +// applicationUsersListOut ApplicationUsersListResponse type applicationUsersListOut struct { - ApplicationUsers []ApplicationUserOut `json:"application_users"` + ApplicationUsers []ApplicationUserOut `json:"application_users"` // Application Users } diff --git a/handler/billinggroup/billinggroup.go b/handler/billinggroup/billinggroup.go index 502d673..db098d9 100644 --- a/handler/billinggroup/billinggroup.go +++ b/handler/billinggroup/billinggroup.go @@ -257,109 +257,121 @@ func BillingCurrencyTypeChoices() []string { } type BillingEmailIn struct { - Email string `json:"email"` + Email string `json:"email"` // User email address } type BillingEmailOut struct { - Email string `json:"email"` + Email string `json:"email"` // User email address } + +// BillingGroupCreateIn BillingGroupCreateRequestBody type BillingGroupCreateIn struct { - AccountId *string `json:"account_id,omitempty"` - AddressLines *[]string `json:"address_lines,omitempty"` - BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` - BillingEmails *[]BillingEmailIn `json:"billing_emails,omitempty"` - BillingExtraText *string `json:"billing_extra_text,omitempty"` - BillingGroupName string `json:"billing_group_name"` - CardId *string `json:"card_id,omitempty"` - City *string `json:"city,omitempty"` - Company *string `json:"company,omitempty"` - CopyFromBillingGroup *string `json:"copy_from_billing_group,omitempty"` - CountryCode *string `json:"country_code,omitempty"` - State *string `json:"state,omitempty"` - VatId *string `json:"vat_id,omitempty"` - ZipCode *string `json:"zip_code,omitempty"` -} + AccountId *string `json:"account_id,omitempty"` // Account ID + AddressLines *[]string `json:"address_lines,omitempty"` // Address lines + BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` // Billing currency + BillingEmails *[]BillingEmailIn `json:"billing_emails,omitempty"` // List of project billing email addresses + BillingExtraText *string `json:"billing_extra_text,omitempty"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number + BillingGroupName string `json:"billing_group_name"` // Billing group name + CardId *string `json:"card_id,omitempty"` // Credit card ID + City *string `json:"city,omitempty"` // Address city + Company *string `json:"company,omitempty"` // Name of a company + CopyFromBillingGroup *string `json:"copy_from_billing_group,omitempty"` // Billing group ID + CountryCode *string `json:"country_code,omitempty"` // Two letter country code for billing country + State *string `json:"state,omitempty"` // Address state + VatId *string `json:"vat_id,omitempty"` // EU VAT Identification Number + ZipCode *string `json:"zip_code,omitempty"` // Address zip code +} + +// BillingGroupCreateOut Billing group information type BillingGroupCreateOut struct { - AccountId string `json:"account_id"` - AccountName string `json:"account_name"` - AddressLines []string `json:"address_lines"` - BillingAddress *string `json:"billing_address,omitempty"` - BillingCurrency BillingCurrencyType `json:"billing_currency"` - BillingEmails []BillingEmailOut `json:"billing_emails"` - BillingExtraText string `json:"billing_extra_text"` - BillingGroupId string `json:"billing_group_id"` - BillingGroupName string `json:"billing_group_name"` - CardInfo CardInfoOut `json:"card_info"` - City string `json:"city"` - Company string `json:"company"` - Country string `json:"country"` - CountryCode string `json:"country_code"` - CreateTime time.Time `json:"create_time"` - EstimatedBalanceLocal string `json:"estimated_balance_local"` - EstimatedBalanceUsd string `json:"estimated_balance_usd"` - PaymentMethod PaymentMethodType `json:"payment_method"` - State string `json:"state"` - VatId string `json:"vat_id"` - ZipCode string `json:"zip_code"` -} + AccountId string `json:"account_id"` // Account ID + AccountName string `json:"account_name"` // Account name + AddressLines []string `json:"address_lines"` // 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"` // Billing currency + BillingEmails []BillingEmailOut `json:"billing_emails"` // List of project billing email addresses + BillingExtraText string `json:"billing_extra_text"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number + BillingGroupId string `json:"billing_group_id"` // Billing group ID + BillingGroupName string `json:"billing_group_name"` // Billing group name + CardInfo CardInfoOut `json:"card_info"` // Credit card assigned to the project + City string `json:"city"` // Address city + Company string `json:"company"` // Name of a company + Country string `json:"country"` // Billing country + CountryCode string `json:"country_code"` // Two letter ISO country code + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + EstimatedBalanceLocal string `json:"estimated_balance_local"` // Estimated balance in billing currency, before tax + EstimatedBalanceUsd string `json:"estimated_balance_usd"` // Estimated balance in USD, before tax + PaymentMethod PaymentMethodType `json:"payment_method"` // Payment method + State string `json:"state"` // Address state + VatId string `json:"vat_id"` // EU VAT Identification Number + ZipCode string `json:"zip_code"` // Address zip code +} + +// BillingGroupCreditsClaimIn BillingGroupCreditsClaimRequestBody type BillingGroupCreditsClaimIn struct { - Code string `json:"code"` + Code string `json:"code"` // Credit code } + +// BillingGroupCreditsClaimOut Assigned credit type BillingGroupCreditsClaimOut struct { - Code *string `json:"code,omitempty"` - ExpireTime *time.Time `json:"expire_time,omitempty"` - RemainingValue *string `json:"remaining_value,omitempty"` - StartTime *time.Time `json:"start_time,omitempty"` - Type CreditType `json:"type,omitempty"` - Value *string `json:"value,omitempty"` + Code *string `json:"code,omitempty"` // Credit code + ExpireTime *time.Time `json:"expire_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC + RemainingValue *string `json:"remaining_value,omitempty"` // Remaining credit value + StartTime *time.Time `json:"start_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC + Type CreditType `json:"type,omitempty"` // Credit type + Value *string `json:"value,omitempty"` // Original credit value, or for expired credits, the consumed credit value } + +// BillingGroupGetOut Billing group information type BillingGroupGetOut struct { - AccountId string `json:"account_id"` - AccountName string `json:"account_name"` - AddressLines []string `json:"address_lines"` - BillingAddress *string `json:"billing_address,omitempty"` - BillingCurrency BillingCurrencyType `json:"billing_currency"` - BillingEmails []BillingEmailOut `json:"billing_emails"` - BillingExtraText string `json:"billing_extra_text"` - BillingGroupId string `json:"billing_group_id"` - BillingGroupName string `json:"billing_group_name"` - CardInfo CardInfoOut `json:"card_info"` - City string `json:"city"` - Company string `json:"company"` - Country string `json:"country"` - CountryCode string `json:"country_code"` - CreateTime time.Time `json:"create_time"` - EstimatedBalanceLocal string `json:"estimated_balance_local"` - EstimatedBalanceUsd string `json:"estimated_balance_usd"` - PaymentMethod PaymentMethodType `json:"payment_method"` - State string `json:"state"` - VatId string `json:"vat_id"` - ZipCode string `json:"zip_code"` + AccountId string `json:"account_id"` // Account ID + AccountName string `json:"account_name"` // Account name + AddressLines []string `json:"address_lines"` // 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"` // Billing currency + BillingEmails []BillingEmailOut `json:"billing_emails"` // List of project billing email addresses + BillingExtraText string `json:"billing_extra_text"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number + BillingGroupId string `json:"billing_group_id"` // Billing group ID + BillingGroupName string `json:"billing_group_name"` // Billing group name + CardInfo CardInfoOut `json:"card_info"` // Credit card assigned to the project + City string `json:"city"` // Address city + Company string `json:"company"` // Name of a company + Country string `json:"country"` // Billing country + CountryCode string `json:"country_code"` // Two letter ISO country code + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + EstimatedBalanceLocal string `json:"estimated_balance_local"` // Estimated balance in billing currency, before tax + EstimatedBalanceUsd string `json:"estimated_balance_usd"` // Estimated balance in USD, before tax + PaymentMethod PaymentMethodType `json:"payment_method"` // Payment method + State string `json:"state"` // Address state + VatId string `json:"vat_id"` // EU VAT Identification Number + ZipCode string `json:"zip_code"` // Address zip code } type BillingGroupOut struct { - AccountId string `json:"account_id"` - AccountName string `json:"account_name"` - AddressLines []string `json:"address_lines"` - BillingAddress *string `json:"billing_address,omitempty"` - BillingCurrency BillingCurrencyType `json:"billing_currency"` - BillingEmails []BillingEmailOut `json:"billing_emails"` - BillingExtraText string `json:"billing_extra_text"` - BillingGroupId string `json:"billing_group_id"` - BillingGroupName string `json:"billing_group_name"` - CardInfo CardInfoOut `json:"card_info"` - City string `json:"city"` - Company string `json:"company"` - Country string `json:"country"` - CountryCode string `json:"country_code"` - CreateTime time.Time `json:"create_time"` - EstimatedBalanceLocal string `json:"estimated_balance_local"` - EstimatedBalanceUsd string `json:"estimated_balance_usd"` - PaymentMethod PaymentMethodType `json:"payment_method"` - State string `json:"state"` - VatId string `json:"vat_id"` - ZipCode string `json:"zip_code"` -} + AccountId string `json:"account_id"` // Account ID + AccountName string `json:"account_name"` // Account name + AddressLines []string `json:"address_lines"` // 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"` // Billing currency + BillingEmails []BillingEmailOut `json:"billing_emails"` // List of project billing email addresses + BillingExtraText string `json:"billing_extra_text"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number + BillingGroupId string `json:"billing_group_id"` // Billing group ID + BillingGroupName string `json:"billing_group_name"` // Billing group name + CardInfo CardInfoOut `json:"card_info"` // Credit card assigned to the project + City string `json:"city"` // Address city + Company string `json:"company"` // Name of a company + Country string `json:"country"` // Billing country + CountryCode string `json:"country_code"` // Two letter ISO country code + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + EstimatedBalanceLocal string `json:"estimated_balance_local"` // Estimated balance in billing currency, before tax + EstimatedBalanceUsd string `json:"estimated_balance_usd"` // Estimated balance in USD, before tax + PaymentMethod PaymentMethodType `json:"payment_method"` // Payment method + State string `json:"state"` // Address state + VatId string `json:"vat_id"` // EU VAT Identification Number + ZipCode string `json:"zip_code"` // Address zip code +} + +// BillingGroupProjectsAssignIn BillingGroupProjectsAssignRequestBody type BillingGroupProjectsAssignIn struct { - ProjectsNames []string `json:"projects_names"` + ProjectsNames []string `json:"projects_names"` // Projects names } type BillingGroupStateType string @@ -372,62 +384,67 @@ func BillingGroupStateTypeChoices() []string { return []string{"active", "deleted"} } +// BillingGroupUpdateIn BillingGroupUpdateRequestBody type BillingGroupUpdateIn struct { - AccountId *string `json:"account_id,omitempty"` - AddressLines *[]string `json:"address_lines,omitempty"` - BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` - BillingEmails *[]BillingEmailIn `json:"billing_emails,omitempty"` - BillingExtraText *string `json:"billing_extra_text,omitempty"` - BillingGroupName *string `json:"billing_group_name,omitempty"` - CardId *string `json:"card_id,omitempty"` - City *string `json:"city,omitempty"` - Company *string `json:"company,omitempty"` - CountryCode *string `json:"country_code,omitempty"` - State *string `json:"state,omitempty"` - VatId *string `json:"vat_id,omitempty"` - ZipCode *string `json:"zip_code,omitempty"` -} + AccountId *string `json:"account_id,omitempty"` // Account ID + AddressLines *[]string `json:"address_lines,omitempty"` // Address lines + BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` // Billing currency + BillingEmails *[]BillingEmailIn `json:"billing_emails,omitempty"` // List of project billing email addresses + BillingExtraText *string `json:"billing_extra_text,omitempty"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number + BillingGroupName *string `json:"billing_group_name,omitempty"` // Billing group name + CardId *string `json:"card_id,omitempty"` // Credit card ID + City *string `json:"city,omitempty"` // Address city + Company *string `json:"company,omitempty"` // Name of a company + CountryCode *string `json:"country_code,omitempty"` // Two letter country code for billing country + State *string `json:"state,omitempty"` // Address state + VatId *string `json:"vat_id,omitempty"` // EU VAT Identification Number + ZipCode *string `json:"zip_code,omitempty"` // Address zip code +} + +// BillingGroupUpdateOut Billing group information type BillingGroupUpdateOut struct { - AccountId string `json:"account_id"` - AccountName string `json:"account_name"` - AddressLines []string `json:"address_lines"` - BillingAddress *string `json:"billing_address,omitempty"` - BillingCurrency BillingCurrencyType `json:"billing_currency"` - BillingEmails []BillingEmailOut `json:"billing_emails"` - BillingExtraText string `json:"billing_extra_text"` - BillingGroupId string `json:"billing_group_id"` - BillingGroupName string `json:"billing_group_name"` - CardInfo CardInfoOut `json:"card_info"` - City string `json:"city"` - Company string `json:"company"` - Country string `json:"country"` - CountryCode string `json:"country_code"` - CreateTime time.Time `json:"create_time"` - EstimatedBalanceLocal string `json:"estimated_balance_local"` - EstimatedBalanceUsd string `json:"estimated_balance_usd"` - PaymentMethod PaymentMethodType `json:"payment_method"` - State string `json:"state"` - VatId string `json:"vat_id"` - ZipCode string `json:"zip_code"` -} + AccountId string `json:"account_id"` // Account ID + AccountName string `json:"account_name"` // Account name + AddressLines []string `json:"address_lines"` // 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"` // Billing currency + BillingEmails []BillingEmailOut `json:"billing_emails"` // List of project billing email addresses + BillingExtraText string `json:"billing_extra_text"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number + BillingGroupId string `json:"billing_group_id"` // Billing group ID + BillingGroupName string `json:"billing_group_name"` // Billing group name + CardInfo CardInfoOut `json:"card_info"` // Credit card assigned to the project + City string `json:"city"` // Address city + Company string `json:"company"` // Name of a company + Country string `json:"country"` // Billing country + CountryCode string `json:"country_code"` // Two letter ISO country code + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + EstimatedBalanceLocal string `json:"estimated_balance_local"` // Estimated balance in billing currency, before tax + EstimatedBalanceUsd string `json:"estimated_balance_usd"` // Estimated balance in USD, before tax + PaymentMethod PaymentMethodType `json:"payment_method"` // Payment method + State string `json:"state"` // Address state + VatId string `json:"vat_id"` // EU VAT Identification Number + ZipCode string `json:"zip_code"` // Address zip code +} + +// CardInfoOut Credit card assigned to the project type CardInfoOut struct { Brand string `json:"brand"` - CardId string `json:"card_id"` + CardId string `json:"card_id"` // Credit card ID Country string `json:"country"` - CountryCode string `json:"country_code"` - ExpMonth int `json:"exp_month"` - ExpYear int `json:"exp_year"` - Last4 string `json:"last4"` - Name string `json:"name"` - UserEmail string `json:"user_email"` + CountryCode string `json:"country_code"` // Two letter ISO country code + ExpMonth int `json:"exp_month"` // Expiration month + ExpYear int `json:"exp_year"` // Expiration year + Last4 string `json:"last4"` // Credit card last four digits + Name string `json:"name"` // Name on the credit card + UserEmail string `json:"user_email"` // User email address } type CreditOut struct { - Code *string `json:"code,omitempty"` - ExpireTime *time.Time `json:"expire_time,omitempty"` - RemainingValue *string `json:"remaining_value,omitempty"` - StartTime *time.Time `json:"start_time,omitempty"` - Type CreditType `json:"type,omitempty"` - Value *string `json:"value,omitempty"` + Code *string `json:"code,omitempty"` // Credit code + ExpireTime *time.Time `json:"expire_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC + RemainingValue *string `json:"remaining_value,omitempty"` // Remaining credit value + StartTime *time.Time `json:"start_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC + Type CreditType `json:"type,omitempty"` // Credit type + Value *string `json:"value,omitempty"` // Original credit value, or for expired credits, the consumed credit value } type CreditType string @@ -473,28 +490,28 @@ func CurrencyTypeChoices() []string { } type EventOut struct { - Actor *string `json:"actor,omitempty"` - BillingGroupId *string `json:"billing_group_id,omitempty"` - CreateTime *time.Time `json:"create_time,omitempty"` - EventDesc *string `json:"event_desc,omitempty"` - EventType *string `json:"event_type,omitempty"` - LogEntryId *int `json:"log_entry_id,omitempty"` - ProjectId *string `json:"project_id,omitempty"` - ProjectName *string `json:"project_name,omitempty"` + Actor *string `json:"actor,omitempty"` // Initiator of the event + BillingGroupId *string `json:"billing_group_id,omitempty"` // Billing group ID + CreateTime *time.Time `json:"create_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC + EventDesc *string `json:"event_desc,omitempty"` // Event description + EventType *string `json:"event_type,omitempty"` // Event type identifier + LogEntryId *int `json:"log_entry_id,omitempty"` // Entry ID + ProjectId *string `json:"project_id,omitempty"` // Identifier of a project + ProjectName *string `json:"project_name,omitempty"` // Project name } type InvoiceOut struct { - BillingGroupId string `json:"billing_group_id"` - BillingGroupName string `json:"billing_group_name"` - BillingGroupState BillingGroupStateType `json:"billing_group_state"` - Currency CurrencyType `json:"currency"` - DownloadCookie string `json:"download_cookie"` - GeneratedAt *time.Time `json:"generated_at,omitempty"` - InvoiceNumber string `json:"invoice_number"` - PeriodBegin string `json:"period_begin"` - PeriodEnd string `json:"period_end"` - State InvoiceStateType `json:"state"` - TotalIncVat string `json:"total_inc_vat"` - TotalVatZero string `json:"total_vat_zero"` + BillingGroupId string `json:"billing_group_id"` // Billing group ID + BillingGroupName string `json:"billing_group_name"` // Billing group name + BillingGroupState BillingGroupStateType `json:"billing_group_state"` // Billing group state + Currency CurrencyType `json:"currency"` // Billing currency + DownloadCookie string `json:"download_cookie"` // Authentication cookie for downloads + GeneratedAt *time.Time `json:"generated_at,omitempty"` // The time when the invoice was generated + InvoiceNumber string `json:"invoice_number"` // Unique invoice reference code + PeriodBegin string `json:"period_begin"` // Period begin + PeriodEnd string `json:"period_end"` // Period end + State InvoiceStateType `json:"state"` // State of this invoice + TotalIncVat string `json:"total_inc_vat"` // Total including taxes + TotalVatZero string `json:"total_vat_zero"` // Total excluding taxes } type InvoiceStateType string @@ -520,21 +537,21 @@ func InvoiceStateTypeChoices() []string { } type LineOut struct { - CloudName *string `json:"cloud_name,omitempty"` - CommitmentName *string `json:"commitment_name,omitempty"` - Description string `json:"description"` - LinePreDiscountLocal *string `json:"line_pre_discount_local,omitempty"` - LineTotalLocal *string `json:"line_total_local,omitempty"` - LineTotalUsd string `json:"line_total_usd"` - LineType LineType `json:"line_type"` - LocalCurrency *string `json:"local_currency,omitempty"` - ProjectName *string `json:"project_name,omitempty"` - ServiceName *string `json:"service_name,omitempty"` - ServicePlan *string `json:"service_plan,omitempty"` - ServiceType ServiceType `json:"service_type,omitempty"` - Tags map[string]string `json:"tags,omitempty"` - TimestampBegin *string `json:"timestamp_begin,omitempty"` - TimestampEnd *string `json:"timestamp_end,omitempty"` + CloudName *string `json:"cloud_name,omitempty"` // Name of the cloud, if billed resource is associated with a cloud resource + CommitmentName *string `json:"commitment_name,omitempty"` // Name of the commitment which is referred to this invoice line + Description string `json:"description"` // Human-readable short description of the invoice line + LinePreDiscountLocal *string `json:"line_pre_discount_local,omitempty"` // Pre-tax sum of invoice line, in local currency, before any discounts + LineTotalLocal *string `json:"line_total_local,omitempty"` // Pre-tax sum of invoice line, in the local currency configured for the invoice + LineTotalUsd string `json:"line_total_usd"` // Pre-tax sum of invoice line, in USD + LineType LineType `json:"line_type"` // Type of the invoice line + LocalCurrency *string `json:"local_currency,omitempty"` // Currency used for line_local_total + ProjectName *string `json:"project_name,omitempty"` // Name of the project this line is associated with, if any + ServiceName *string `json:"service_name,omitempty"` // Name of the service, if invoice line is for service use + ServicePlan *string `json:"service_plan,omitempty"` // Service plan name, if invoice line is for service use + ServiceType ServiceType `json:"service_type,omitempty"` // Service type, if invoice line is for service use + Tags map[string]string `json:"tags,omitempty"` // Billing tags + TimestampBegin *string `json:"timestamp_begin,omitempty"` // Begin timestamp of the billed time period, for resources billed by time + TimestampEnd *string `json:"timestamp_end,omitempty"` // End timestamp of the billed time period, for resources billed by time } type LineType string @@ -570,9 +587,9 @@ func PaymentMethodTypeChoices() []string { } type ProjectOut struct { - AvailableCredits string `json:"available_credits"` - EstimatedBalance string `json:"estimated_balance"` - ProjectName string `json:"project_name"` + AvailableCredits string `json:"available_credits"` // Available credits + EstimatedBalance string `json:"estimated_balance"` // Estimated balance + ProjectName string `json:"project_name"` // Project name } type ServiceType string @@ -611,33 +628,52 @@ func ServiceTypeChoices() []string { return []string{"alertmanager", "cassandra", "clickhouse", "dragonfly", "elasticsearch", "flink", "grafana", "influxdb", "kafka", "kafka_connect", "kafka_mirrormaker", "m3aggregator", "m3db", "mysql", "opensearch", "parca", "pg", "redis", "stresstester", "sw", "thanos", "thanoscompactor", "thanosquery", "thanosreceiver", "thanosstore", "valkey", "vector", "vmalert"} } +// billingGroupCreateOut BillingGroupCreateResponse type billingGroupCreateOut struct { - BillingGroup BillingGroupCreateOut `json:"billing_group"` + BillingGroup BillingGroupCreateOut `json:"billing_group"` // Billing group information } + +// billingGroupCreditsClaimOut BillingGroupCreditsClaimResponse type billingGroupCreditsClaimOut struct { - Credit BillingGroupCreditsClaimOut `json:"credit"` + Credit BillingGroupCreditsClaimOut `json:"credit"` // Assigned credit } + +// billingGroupCreditsListOut BillingGroupCreditsListResponse type billingGroupCreditsListOut struct { - Credits []CreditOut `json:"credits"` + Credits []CreditOut `json:"credits"` // List of credits assigned to a billing group } + +// billingGroupEventListOut BillingGroupEventListResponse type billingGroupEventListOut struct { - Events []EventOut `json:"events"` + Events []EventOut `json:"events"` // List of events related to a billing group } + +// billingGroupGetOut BillingGroupGetResponse type billingGroupGetOut struct { - BillingGroup BillingGroupGetOut `json:"billing_group"` + BillingGroup BillingGroupGetOut `json:"billing_group"` // Billing group information } + +// billingGroupInvoiceLinesListOut BillingGroupInvoiceLinesListResponse type billingGroupInvoiceLinesListOut struct { - Lines []LineOut `json:"lines,omitempty"` + Lines []LineOut `json:"lines,omitempty"` // List of invoice lines } + +// billingGroupInvoiceListOut BillingGroupInvoiceListResponse type billingGroupInvoiceListOut struct { - Invoices []InvoiceOut `json:"invoices"` + Invoices []InvoiceOut `json:"invoices"` // List of billing group invoices } + +// billingGroupListOut BillingGroupListResponse type billingGroupListOut struct { - BillingGroups []BillingGroupOut `json:"billing_groups"` + BillingGroups []BillingGroupOut `json:"billing_groups"` // List of billing groups } + +// billingGroupProjectListOut BillingGroupProjectListResponse type billingGroupProjectListOut struct { - Projects []ProjectOut `json:"projects"` + Projects []ProjectOut `json:"projects"` // List of projects assigned to billing group } + +// billingGroupUpdateOut BillingGroupUpdateResponse type billingGroupUpdateOut struct { - BillingGroup BillingGroupUpdateOut `json:"billing_group"` + BillingGroup BillingGroupUpdateOut `json:"billing_group"` // Billing group information } diff --git a/handler/clickhouse/clickhouse.go b/handler/clickhouse/clickhouse.go index abfc5fd..f1435de 100644 --- a/handler/clickhouse/clickhouse.go +++ b/handler/clickhouse/clickhouse.go @@ -135,10 +135,10 @@ func (h *ClickHouseHandler) ServiceClickHouseTieredStorageSummary(ctx context.Co } type DatabaseOut struct { - Engine string `json:"engine"` - Name string `json:"name"` - Required bool `json:"required"` - State DatabaseStateType `json:"state,omitempty"` + Engine string `json:"engine"` // Database engine + Name string `json:"name"` // Database name + Required bool `json:"required"` // Required database + State DatabaseStateType `json:"state,omitempty"` // Database state } type DatabaseStateType string @@ -153,70 +153,88 @@ func DatabaseStateTypeChoices() []string { } type HourlyOut struct { - EstimatedCost *string `json:"estimated_cost,omitempty"` - HourStart string `json:"hour_start"` - PeakStoredBytes int `json:"peak_stored_bytes"` + EstimatedCost *string `json:"estimated_cost,omitempty"` // The estimated cost in USD of tiered storage for this hour + HourStart string `json:"hour_start"` // Timestamp in ISO 8601 format, always in UTC + PeakStoredBytes int `json:"peak_stored_bytes"` // Peak bytes stored on object storage at this hour } type MetaOut struct { - Name string `json:"name"` - Type string `json:"type"` + Name string `json:"name"` // Column name + Type string `json:"type"` // Column type } type QueryOut struct { - ClientName *string `json:"client_name,omitempty"` + ClientName *string `json:"client_name,omitempty"` // Client name, if set Database *string `json:"database,omitempty"` - Elapsed *float64 `json:"elapsed,omitempty"` - Query *string `json:"query,omitempty"` - User *string `json:"user,omitempty"` + Elapsed *float64 `json:"elapsed,omitempty"` // The time in seconds since request execution started + Query *string `json:"query,omitempty"` // The query text + User *string `json:"user,omitempty"` // The user who made the query } type QueryOutAlt struct { - Calls *int `json:"calls,omitempty"` + Calls *int `json:"calls,omitempty"` // Number of calls Database *string `json:"database,omitempty"` - MaxTime *int `json:"max_time,omitempty"` - MeanTime *int `json:"mean_time,omitempty"` - MinTime *int `json:"min_time,omitempty"` - P95Time *int `json:"p95_time,omitempty"` - Query *string `json:"query,omitempty"` - Rows *float64 `json:"rows,omitempty"` - StddevTime *int `json:"stddev_time,omitempty"` - TotalTime *int `json:"total_time,omitempty"` + MaxTime *int `json:"max_time,omitempty"` // Maximum query duration in milliseconds + MeanTime *int `json:"mean_time,omitempty"` // Average query duration in milliseconds + MinTime *int `json:"min_time,omitempty"` // Minimum query duration in milliseconds + P95Time *int `json:"p95_time,omitempty"` // Query duration 95th percentile in milliseconds + Query *string `json:"query,omitempty"` // Normalized query + Rows *float64 `json:"rows,omitempty"` // Average number of rows per call + StddevTime *int `json:"stddev_time,omitempty"` // Query duration standard deviation in milliseconds + TotalTime *int `json:"total_time,omitempty"` // Total duration of all calls in milliseconds } + +// ServiceClickHouseDatabaseCreateIn ServiceClickHouseDatabaseCreateRequestBody type ServiceClickHouseDatabaseCreateIn struct { - Database string `json:"database"` + Database string `json:"database"` // Service database name } + +// ServiceClickHouseQueryIn ServiceClickHouseQueryRequestBody type ServiceClickHouseQueryIn struct { - Database string `json:"database"` + Database string `json:"database"` // Service database name Query string `json:"query"` } + +// ServiceClickHouseQueryOut ServiceClickHouseQueryResponse type ServiceClickHouseQueryOut struct { Data [][]any `json:"data"` Meta []MetaOut `json:"meta"` - Summary SummaryOut `json:"summary"` + Summary SummaryOut `json:"summary"` // Summary } + +// ServiceClickHouseTieredStorageSummaryOut ServiceClickHouseTieredStorageSummaryResponse type ServiceClickHouseTieredStorageSummaryOut struct { - CurrentCost string `json:"current_cost"` - ForecastedCost string `json:"forecasted_cost"` - ForecastedRate *string `json:"forecasted_rate,omitempty"` - StorageUsageHistory StorageUsageHistoryOut `json:"storage_usage_history"` - TotalStorageUsage int `json:"total_storage_usage"` + CurrentCost string `json:"current_cost"` // The current cost in USD of tiered storage since the beginning of the billing period + ForecastedCost string `json:"forecasted_cost"` // The forecasted cost in USD of tiered storage in the billing period + ForecastedRate *string `json:"forecasted_rate,omitempty"` // The rate on GBs/hour used to calculate the forecasted cost + StorageUsageHistory StorageUsageHistoryOut `json:"storage_usage_history"` // History of usage and cumulative costs in the billing period + TotalStorageUsage int `json:"total_storage_usage"` // Total storage usage by tiered storage, in bytes } + +// StorageUsageHistoryOut History of usage and cumulative costs in the billing period type StorageUsageHistoryOut struct { - Hourly []HourlyOut `json:"hourly"` + Hourly []HourlyOut `json:"hourly"` // History by hour } + +// SummaryOut Summary type SummaryOut struct { - ElapsedNs *int `json:"elapsed_ns,omitempty"` - ReadBytes *int `json:"read_bytes,omitempty"` - ReadRows *int `json:"read_rows,omitempty"` - ResultBytes *int `json:"result_bytes,omitempty"` - ResultRows *int `json:"result_rows,omitempty"` - WrittenBytes *int `json:"written_bytes,omitempty"` - WrittenRows *int `json:"written_rows,omitempty"` + ElapsedNs *int `json:"elapsed_ns,omitempty"` // Elapsed time in nanoseconds + ReadBytes *int `json:"read_bytes,omitempty"` // Number of bytes read + ReadRows *int `json:"read_rows,omitempty"` // Number of rows read + ResultBytes *int `json:"result_bytes,omitempty"` // Number of bytes in the result + ResultRows *int `json:"result_rows,omitempty"` // Number of rows in the result + WrittenBytes *int `json:"written_bytes,omitempty"` // Number of bytes written + WrittenRows *int `json:"written_rows,omitempty"` // Number of rows written } + +// serviceClickHouseCurrentQueriesOut ServiceClickHouseCurrentQueriesResponse type serviceClickHouseCurrentQueriesOut struct { - Queries []QueryOut `json:"queries"` + Queries []QueryOut `json:"queries"` // List of currently running queries } + +// serviceClickHouseDatabaseListOut ServiceClickHouseDatabaseListResponse type serviceClickHouseDatabaseListOut struct { - Databases []DatabaseOut `json:"databases"` + Databases []DatabaseOut `json:"databases"` // List of databases } + +// serviceClickHouseQueryStatsOut ServiceClickHouseQueryStatsResponse type serviceClickHouseQueryStatsOut struct { - Queries []QueryOutAlt `json:"queries"` + Queries []QueryOutAlt `json:"queries"` // List of query statistics } diff --git a/handler/cloud/cloud.go b/handler/cloud/cloud.go index a492322..aa1a487 100644 --- a/handler/cloud/cloud.go +++ b/handler/cloud/cloud.go @@ -61,17 +61,21 @@ func (h *CloudHandler) ListProjectClouds(ctx context.Context, project string) ([ } type CloudOut struct { - CloudDescription *string `json:"cloud_description,omitempty"` - CloudName string `json:"cloud_name"` - GeoLatitude *float64 `json:"geo_latitude,omitempty"` - GeoLongitude *float64 `json:"geo_longitude,omitempty"` - GeoRegion string `json:"geo_region"` - Provider *string `json:"provider,omitempty"` - ProviderDescription *string `json:"provider_description,omitempty"` + CloudDescription *string `json:"cloud_description,omitempty"` // Cloud provider and location + CloudName string `json:"cloud_name"` // Target cloud + GeoLatitude *float64 `json:"geo_latitude,omitempty"` // Approximate geographic latitude of the datacenters + GeoLongitude *float64 `json:"geo_longitude,omitempty"` // Approximate geographic longitude of the datacenters + GeoRegion string `json:"geo_region"` // Geographical region + Provider *string `json:"provider,omitempty"` // Cloud provider name + ProviderDescription *string `json:"provider_description,omitempty"` // Cloud provider description } + +// listCloudsOut ListCloudsResponse type listCloudsOut struct { - Clouds []CloudOut `json:"clouds"` + Clouds []CloudOut `json:"clouds"` // List of available clouds } + +// listProjectCloudsOut ListProjectCloudsResponse type listProjectCloudsOut struct { - Clouds []CloudOut `json:"clouds"` + Clouds []CloudOut `json:"clouds"` // List of available clouds } diff --git a/handler/domain/domain.go b/handler/domain/domain.go index 0a0b0cf..58571dc 100644 --- a/handler/domain/domain.go +++ b/handler/domain/domain.go @@ -108,14 +108,14 @@ func (h *DomainHandler) OrganizationDomainsRemove(ctx context.Context, organizat } type DomainOut struct { - ChallengeToken string `json:"challenge_token"` - CreateTime time.Time `json:"create_time"` - DomainId string `json:"domain_id"` - DomainName string `json:"domain_name"` - LinkedAuthenticationMethodIds []string `json:"linked_authentication_method_ids"` - OrganizationId string `json:"organization_id"` - State DomainStateType `json:"state"` - VerificationType VerificationType `json:"verification_type"` + ChallengeToken string `json:"challenge_token"` // Random string to be used for validation + CreateTime time.Time `json:"create_time"` // Time of creating the domain + DomainId string `json:"domain_id"` // ID of the domain + DomainName string `json:"domain_name"` // Name of the domain + LinkedAuthenticationMethodIds []string `json:"linked_authentication_method_ids"` // Linked Authentication Method Ids + OrganizationId string `json:"organization_id"` // ID of the organization owning this domain + State DomainStateType `json:"state"` // State of the verification process + VerificationType VerificationType `json:"verification_type"` // Type of verification to be made } type DomainStateType string @@ -129,19 +129,22 @@ func DomainStateTypeChoices() []string { return []string{"deleted", "unverified", "verified"} } +// OrganizationDomainAddIn OrganizationDomainAddRequestBody type OrganizationDomainAddIn struct { - DomainName string `json:"domain_name"` - VerificationType VerificationType `json:"verification_type"` + DomainName string `json:"domain_name"` // Name of the domain to be added + VerificationType VerificationType `json:"verification_type"` // Type of verification to be made } + +// OrganizationDomainAddOut OrganizationDomainAddResponse type OrganizationDomainAddOut struct { - ChallengeToken string `json:"challenge_token"` - CreateTime time.Time `json:"create_time"` - DomainId string `json:"domain_id"` - DomainName string `json:"domain_name"` - LinkedAuthenticationMethodIds []string `json:"linked_authentication_method_ids"` - OrganizationId string `json:"organization_id"` - State OrganizationDomainAddStateType `json:"state"` - VerificationType VerificationType `json:"verification_type"` + ChallengeToken string `json:"challenge_token"` // Random string to be used for validation + CreateTime time.Time `json:"create_time"` // Time of creating the domain + DomainId string `json:"domain_id"` // ID of the domain + DomainName string `json:"domain_name"` // Name of the domain + LinkedAuthenticationMethodIds []string `json:"linked_authentication_method_ids"` // Linked Authentication Method Ids + OrganizationId string `json:"organization_id"` // ID of the organization owning this domain + State OrganizationDomainAddStateType `json:"state"` // State of the verification process + VerificationType VerificationType `json:"verification_type"` // Type of verification to be made } type OrganizationDomainAddStateType string @@ -167,28 +170,33 @@ func OrganizationDomainStateTypeChoices() []string { return []string{"deleted", "unverified", "verified"} } +// OrganizationDomainUpdateIn OrganizationDomainUpdateRequestBody type OrganizationDomainUpdateIn struct { - VerificationType VerificationType `json:"verification_type,omitempty"` + VerificationType VerificationType `json:"verification_type,omitempty"` // OrganizationDomainVerificationType } + +// OrganizationDomainUpdateOut OrganizationDomainUpdateResponse type OrganizationDomainUpdateOut struct { - ChallengeToken string `json:"challenge_token"` - CreateTime time.Time `json:"create_time"` - DomainId string `json:"domain_id"` - DomainName string `json:"domain_name"` - LinkedAuthenticationMethodIds []string `json:"linked_authentication_method_ids"` - OrganizationId string `json:"organization_id"` - State OrganizationDomainStateType `json:"state"` - VerificationType VerificationType `json:"verification_type"` + ChallengeToken string `json:"challenge_token"` // Random string to be used for validation + CreateTime time.Time `json:"create_time"` // Time of creating the domain + DomainId string `json:"domain_id"` // ID of the domain + DomainName string `json:"domain_name"` // Name of the domain + LinkedAuthenticationMethodIds []string `json:"linked_authentication_method_ids"` // Linked Authentication Method Ids + OrganizationId string `json:"organization_id"` // ID of the organization owning this domain + State OrganizationDomainStateType `json:"state"` // State of the verification process + VerificationType VerificationType `json:"verification_type"` // Type of verification to be made } + +// OrganizationDomainVerifyOut OrganizationDomainVerifyResponse type OrganizationDomainVerifyOut struct { - ChallengeToken string `json:"challenge_token"` - CreateTime time.Time `json:"create_time"` - DomainId string `json:"domain_id"` - DomainName string `json:"domain_name"` - LinkedAuthenticationMethodIds []string `json:"linked_authentication_method_ids"` - OrganizationId string `json:"organization_id"` - State OrganizationDomainStateType `json:"state"` - VerificationType VerificationType `json:"verification_type"` + ChallengeToken string `json:"challenge_token"` // Random string to be used for validation + CreateTime time.Time `json:"create_time"` // Time of creating the domain + DomainId string `json:"domain_id"` // ID of the domain + DomainName string `json:"domain_name"` // Name of the domain + LinkedAuthenticationMethodIds []string `json:"linked_authentication_method_ids"` // Linked Authentication Method Ids + OrganizationId string `json:"organization_id"` // ID of the organization owning this domain + State OrganizationDomainStateType `json:"state"` // State of the verification process + VerificationType VerificationType `json:"verification_type"` // Type of verification to be made } type VerificationType string @@ -201,6 +209,7 @@ func VerificationTypeChoices() []string { return []string{"dns", "http"} } +// organizationDomainsListOut OrganizationDomainsListResponse type organizationDomainsListOut struct { - Domains []DomainOut `json:"domains"` + Domains []DomainOut `json:"domains"` // List of domains for the organization } diff --git a/handler/flink/flink.go b/handler/flink/flink.go index 3c3b409..b7b4cc9 100644 --- a/handler/flink/flink.go +++ b/handler/flink/flink.go @@ -42,14 +42,15 @@ func (h *FlinkHandler) ServiceFlinkOverview(ctx context.Context, project string, return out, nil } +// ServiceFlinkOverviewOut ServiceFlinkOverviewResponse type ServiceFlinkOverviewOut struct { - FlinkCommit *string `json:"flink-commit,omitempty"` - FlinkVersion *string `json:"flink-version,omitempty"` - JobsCancelled *int `json:"jobs-cancelled,omitempty"` - JobsFailed *int `json:"jobs-failed,omitempty"` - JobsFinished *int `json:"jobs-finished,omitempty"` - JobsRunning *int `json:"jobs-running,omitempty"` - SlotsAvailable *int `json:"slots-available,omitempty"` - SlotsTotal *int `json:"slots-total,omitempty"` - Taskmanagers *int `json:"taskmanagers,omitempty"` + FlinkCommit *string `json:"flink-commit,omitempty"` // Commit of Flink version + FlinkVersion *string `json:"flink-version,omitempty"` // Flink version + JobsCancelled *int `json:"jobs-cancelled,omitempty"` // Number of cancelled jobs + JobsFailed *int `json:"jobs-failed,omitempty"` // Number of failed jobs + JobsFinished *int `json:"jobs-finished,omitempty"` // Number of finished jobs + JobsRunning *int `json:"jobs-running,omitempty"` // Number of running jobs + SlotsAvailable *int `json:"slots-available,omitempty"` // Number of slots available + SlotsTotal *int `json:"slots-total,omitempty"` // Number of slots + Taskmanagers *int `json:"taskmanagers,omitempty"` // Number of TaskManagers } diff --git a/handler/flinkapplication/flinkapplication.go b/handler/flinkapplication/flinkapplication.go index c0754d7..6ceceae 100644 --- a/handler/flinkapplication/flinkapplication.go +++ b/handler/flinkapplication/flinkapplication.go @@ -116,47 +116,51 @@ func (h *FlinkApplicationHandler) ServiceFlinkUpdateApplication(ctx context.Cont } type ApplicationOut struct { - CreatedAt *time.Time `json:"created_at,omitempty"` - CreatedBy *string `json:"created_by,omitempty"` - Id string `json:"id"` - Name string `json:"name"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - UpdatedBy *string `json:"updated_by,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` // Created at + CreatedBy *string `json:"created_by,omitempty"` // Created by + Id string `json:"id"` // Application ID + Name string `json:"name"` // Application name + UpdatedAt *time.Time `json:"updated_at,omitempty"` // Updated at + UpdatedBy *string `json:"updated_by,omitempty"` // Updated by } + +// ApplicationVersionIn Flink ApplicationVersion type ApplicationVersionIn struct { Sinks []SinkIn `json:"sinks"` Sources []SourceIn `json:"sources"` - Statement string `json:"statement"` + Statement string `json:"statement"` // Job SQL statement } type ApplicationVersionOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - Id string `json:"id"` + CreatedAt time.Time `json:"created_at"` // Created at + CreatedBy string `json:"created_by"` // Created by + Id string `json:"id"` // ApplicationVersion ID Sinks []SinkOut `json:"sinks"` Sources []SourceOut `json:"sources"` - Statement string `json:"statement"` - Version int `json:"version"` + Statement string `json:"statement"` // Job SQL statement + Version int `json:"version"` // Version number } type ColumnOut struct { - DataType string `json:"data_type"` - Extras *string `json:"extras,omitempty"` - Key *string `json:"key,omitempty"` - Name string `json:"name"` - Nullable bool `json:"nullable"` - Watermark *string `json:"watermark,omitempty"` + DataType string `json:"data_type"` // The data type of the column + Extras *string `json:"extras,omitempty"` // Column extra information + Key *string `json:"key,omitempty"` // The key info of the column + Name string `json:"name"` // The name of the column + Nullable bool `json:"nullable"` // Whether the column is nullable, i.e. if true, the column is NOT NULL + Watermark *string `json:"watermark,omitempty"` // Information of the watermark if the column is used for watermark. } + +// CurrentDeploymentOut Flink ApplicationDeployment type CurrentDeploymentOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - ErrorMsg *string `json:"error_msg,omitempty"` - Id string `json:"id"` - JobId *string `json:"job_id,omitempty"` - LastSavepoint *string `json:"last_savepoint,omitempty"` - Parallelism int `json:"parallelism"` - RestartEnabled bool `json:"restart_enabled"` - StartingSavepoint *string `json:"starting_savepoint,omitempty"` - Status CurrentDeploymentStatusType `json:"status"` - VersionId string `json:"version_id"` + CreatedAt time.Time `json:"created_at"` // Created at + CreatedBy string `json:"created_by"` // Created by + ErrorMsg *string `json:"error_msg,omitempty"` // Deployment error + Id string `json:"id"` // Deployment ID + JobId *string `json:"job_id,omitempty"` // Job ID + LastSavepoint *string `json:"last_savepoint,omitempty"` // Job savepoint + Parallelism int `json:"parallelism"` // Flink Job parallelism + RestartEnabled bool `json:"restart_enabled"` // Specifies whether a Flink Job is restarted in case it fails + StartingSavepoint *string `json:"starting_savepoint,omitempty"` // Job savepoint + Status CurrentDeploymentStatusType `json:"status"` // Deployment status + VersionId string `json:"version_id"` // ApplicationVersion ID } type CurrentDeploymentStatusType string @@ -184,77 +188,90 @@ func CurrentDeploymentStatusTypeChoices() []string { return []string{"INITIALIZING", "CREATED", "RUNNING", "FAILING", "FAILED", "SAVING", "CANCELLING_REQUESTED", "CANCELLING", "CANCELED", "SAVING_AND_STOP_REQUESTED", "SAVING_AND_STOP", "FINISHED", "RESTARTING", "SUSPENDED", "DELETE_REQUESTED", "DELETING", "RECONCILING"} } +// ServiceFlinkCreateApplicationIn ServiceFlinkCreateApplicationRequestBody type ServiceFlinkCreateApplicationIn struct { - ApplicationVersion *ApplicationVersionIn `json:"application_version,omitempty"` - Name string `json:"name"` + ApplicationVersion *ApplicationVersionIn `json:"application_version,omitempty"` // Flink ApplicationVersion + Name string `json:"name"` // Application name } + +// ServiceFlinkCreateApplicationOut ServiceFlinkCreateApplicationResponse type ServiceFlinkCreateApplicationOut struct { ApplicationVersions []ApplicationVersionOut `json:"application_versions"` - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - CurrentDeployment *CurrentDeploymentOut `json:"current_deployment,omitempty"` - Id string `json:"id"` - Name string `json:"name"` - UpdatedAt time.Time `json:"updated_at"` - UpdatedBy string `json:"updated_by"` + CreatedAt time.Time `json:"created_at"` // Created at + CreatedBy string `json:"created_by"` // Created by + CurrentDeployment *CurrentDeploymentOut `json:"current_deployment,omitempty"` // Flink ApplicationDeployment + Id string `json:"id"` // Application ID + Name string `json:"name"` // Application name + UpdatedAt time.Time `json:"updated_at"` // Updated at + UpdatedBy string `json:"updated_by"` // Updated by } + +// ServiceFlinkDeleteApplicationOut ServiceFlinkDeleteApplicationResponse type ServiceFlinkDeleteApplicationOut struct { ApplicationVersions []ApplicationVersionOut `json:"application_versions"` - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - CurrentDeployment *CurrentDeploymentOut `json:"current_deployment,omitempty"` - Id string `json:"id"` - Name string `json:"name"` - UpdatedAt time.Time `json:"updated_at"` - UpdatedBy string `json:"updated_by"` + CreatedAt time.Time `json:"created_at"` // Created at + CreatedBy string `json:"created_by"` // Created by + CurrentDeployment *CurrentDeploymentOut `json:"current_deployment,omitempty"` // Flink ApplicationDeployment + Id string `json:"id"` // Application ID + Name string `json:"name"` // Application name + UpdatedAt time.Time `json:"updated_at"` // Updated at + UpdatedBy string `json:"updated_by"` // Updated by } + +// ServiceFlinkGetApplicationOut ServiceFlinkGetApplicationResponse type ServiceFlinkGetApplicationOut struct { ApplicationVersions []ApplicationVersionOut `json:"application_versions"` - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - CurrentDeployment *CurrentDeploymentOut `json:"current_deployment,omitempty"` - Id string `json:"id"` - Name string `json:"name"` - UpdatedAt time.Time `json:"updated_at"` - UpdatedBy string `json:"updated_by"` + CreatedAt time.Time `json:"created_at"` // Created at + CreatedBy string `json:"created_by"` // Created by + CurrentDeployment *CurrentDeploymentOut `json:"current_deployment,omitempty"` // Flink ApplicationDeployment + Id string `json:"id"` // Application ID + Name string `json:"name"` // Application name + UpdatedAt time.Time `json:"updated_at"` // Updated at + UpdatedBy string `json:"updated_by"` // Updated by } + +// ServiceFlinkUpdateApplicationIn ServiceFlinkUpdateApplicationRequestBody type ServiceFlinkUpdateApplicationIn struct { - Name string `json:"name"` + Name string `json:"name"` // Application name } + +// ServiceFlinkUpdateApplicationOut ServiceFlinkUpdateApplicationResponse type ServiceFlinkUpdateApplicationOut struct { ApplicationVersions []ApplicationVersionOut `json:"application_versions"` - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - CurrentDeployment *CurrentDeploymentOut `json:"current_deployment,omitempty"` - Id string `json:"id"` - Name string `json:"name"` - UpdatedAt time.Time `json:"updated_at"` - UpdatedBy string `json:"updated_by"` + CreatedAt time.Time `json:"created_at"` // Created at + CreatedBy string `json:"created_by"` // Created by + CurrentDeployment *CurrentDeploymentOut `json:"current_deployment,omitempty"` // Flink ApplicationDeployment + Id string `json:"id"` // Application ID + Name string `json:"name"` // Application name + UpdatedAt time.Time `json:"updated_at"` // Updated at + UpdatedBy string `json:"updated_by"` // Updated by } type SinkIn struct { - CreateTable string `json:"create_table"` - IntegrationId *string `json:"integration_id,omitempty"` + CreateTable string `json:"create_table"` // The CREATE TABLE statement + IntegrationId *string `json:"integration_id,omitempty"` // Integration ID } type SinkOut struct { Columns []ColumnOut `json:"columns"` - CreateTable string `json:"create_table"` - IntegrationId *string `json:"integration_id,omitempty"` - Options map[string]any `json:"options"` - TableId string `json:"table_id"` - TableName string `json:"table_name"` + CreateTable string `json:"create_table"` // The CREATE TABLE statement + IntegrationId *string `json:"integration_id,omitempty"` // Integration ID + Options map[string]any `json:"options"` // Option + TableId string `json:"table_id"` // Sink ID + TableName string `json:"table_name"` // Table name } type SourceIn struct { - CreateTable string `json:"create_table"` - IntegrationId *string `json:"integration_id,omitempty"` + CreateTable string `json:"create_table"` // The CREATE TABLE statement + IntegrationId *string `json:"integration_id,omitempty"` // Integration ID } type SourceOut struct { Columns []ColumnOut `json:"columns"` - CreateTable string `json:"create_table"` - IntegrationId *string `json:"integration_id,omitempty"` - Options map[string]any `json:"options"` - TableId string `json:"table_id"` - TableName string `json:"table_name"` + CreateTable string `json:"create_table"` // The CREATE TABLE statement + IntegrationId *string `json:"integration_id,omitempty"` // Integration ID + Options map[string]any `json:"options"` // Option + TableId string `json:"table_id"` // Source ID + TableName string `json:"table_name"` // Table name } + +// serviceFlinkListApplicationsOut ServiceFlinkListApplicationsResponse type serviceFlinkListApplicationsOut struct { - Applications []ApplicationOut `json:"applications"` + Applications []ApplicationOut `json:"applications"` // Flink Applications } diff --git a/handler/flinkapplicationdeployment/flinkapplicationdeployment.go b/handler/flinkapplicationdeployment/flinkapplicationdeployment.go index cf33084..dd34dec 100644 --- a/handler/flinkapplicationdeployment/flinkapplicationdeployment.go +++ b/handler/flinkapplicationdeployment/flinkapplicationdeployment.go @@ -134,17 +134,17 @@ func (h *FlinkApplicationDeploymentHandler) ServiceFlinkStopApplicationDeploymen } type DeploymentOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - ErrorMsg *string `json:"error_msg,omitempty"` - Id string `json:"id"` - JobId *string `json:"job_id,omitempty"` - LastSavepoint *string `json:"last_savepoint,omitempty"` - Parallelism int `json:"parallelism"` - RestartEnabled bool `json:"restart_enabled"` - StartingSavepoint *string `json:"starting_savepoint,omitempty"` - Status DeploymentStatusType `json:"status"` - VersionId string `json:"version_id"` + CreatedAt time.Time `json:"created_at"` // Created at + CreatedBy string `json:"created_by"` // Created by + ErrorMsg *string `json:"error_msg,omitempty"` // Deployment error + Id string `json:"id"` // Deployment ID + JobId *string `json:"job_id,omitempty"` // Job ID + LastSavepoint *string `json:"last_savepoint,omitempty"` // Job savepoint + Parallelism int `json:"parallelism"` // Flink Job parallelism + RestartEnabled bool `json:"restart_enabled"` // Specifies whether a Flink Job is restarted in case it fails + StartingSavepoint *string `json:"starting_savepoint,omitempty"` // Job savepoint + Status DeploymentStatusType `json:"status"` // Deployment status + VersionId string `json:"version_id"` // ApplicationVersion ID } type DeploymentStatusType string @@ -198,77 +198,90 @@ func ServiceFlinkApplicationDeploymentStatusTypeChoices() []string { return []string{"INITIALIZING", "CREATED", "RUNNING", "FAILING", "FAILED", "SAVING", "CANCELLING_REQUESTED", "CANCELLING", "CANCELED", "SAVING_AND_STOP_REQUESTED", "SAVING_AND_STOP", "FINISHED", "RESTARTING", "SUSPENDED", "DELETE_REQUESTED", "DELETING", "RECONCILING"} } +// ServiceFlinkCancelApplicationDeploymentOut ServiceFlinkCancelApplicationDeploymentResponse type ServiceFlinkCancelApplicationDeploymentOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - ErrorMsg *string `json:"error_msg,omitempty"` - Id string `json:"id"` - JobId *string `json:"job_id,omitempty"` - LastSavepoint *string `json:"last_savepoint,omitempty"` - Parallelism int `json:"parallelism"` - RestartEnabled bool `json:"restart_enabled"` - StartingSavepoint *string `json:"starting_savepoint,omitempty"` - Status ServiceFlinkApplicationDeploymentStatusType `json:"status"` - VersionId string `json:"version_id"` + CreatedAt time.Time `json:"created_at"` // Created at + CreatedBy string `json:"created_by"` // Created by + ErrorMsg *string `json:"error_msg,omitempty"` // Deployment error + Id string `json:"id"` // Deployment ID + JobId *string `json:"job_id,omitempty"` // Job ID + LastSavepoint *string `json:"last_savepoint,omitempty"` // Job savepoint + Parallelism int `json:"parallelism"` // Flink Job parallelism + RestartEnabled bool `json:"restart_enabled"` // Specifies whether a Flink Job is restarted in case it fails + StartingSavepoint *string `json:"starting_savepoint,omitempty"` // Job savepoint + Status ServiceFlinkApplicationDeploymentStatusType `json:"status"` // Deployment status + VersionId string `json:"version_id"` // ApplicationVersion ID } + +// ServiceFlinkCreateApplicationDeploymentIn ServiceFlinkCreateApplicationDeploymentRequestBody type ServiceFlinkCreateApplicationDeploymentIn struct { - Parallelism *int `json:"parallelism,omitempty"` - RestartEnabled *bool `json:"restart_enabled,omitempty"` - StartingSavepoint *string `json:"starting_savepoint,omitempty"` - VersionId string `json:"version_id"` + Parallelism *int `json:"parallelism,omitempty"` // Flink Job parallelism + RestartEnabled *bool `json:"restart_enabled,omitempty"` // Specifies whether a Flink Job is restarted in case it fails + StartingSavepoint *string `json:"starting_savepoint,omitempty"` // Job savepoint + VersionId string `json:"version_id"` // ApplicationVersion ID } + +// ServiceFlinkCreateApplicationDeploymentOut ServiceFlinkCreateApplicationDeploymentResponse type ServiceFlinkCreateApplicationDeploymentOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - ErrorMsg *string `json:"error_msg,omitempty"` - Id string `json:"id"` - JobId *string `json:"job_id,omitempty"` - LastSavepoint *string `json:"last_savepoint,omitempty"` - Parallelism int `json:"parallelism"` - RestartEnabled bool `json:"restart_enabled"` - StartingSavepoint *string `json:"starting_savepoint,omitempty"` - Status ServiceFlinkApplicationDeploymentStatusType `json:"status"` - VersionId string `json:"version_id"` + CreatedAt time.Time `json:"created_at"` // Created at + CreatedBy string `json:"created_by"` // Created by + ErrorMsg *string `json:"error_msg,omitempty"` // Deployment error + Id string `json:"id"` // Deployment ID + JobId *string `json:"job_id,omitempty"` // Job ID + LastSavepoint *string `json:"last_savepoint,omitempty"` // Job savepoint + Parallelism int `json:"parallelism"` // Flink Job parallelism + RestartEnabled bool `json:"restart_enabled"` // Specifies whether a Flink Job is restarted in case it fails + StartingSavepoint *string `json:"starting_savepoint,omitempty"` // Job savepoint + Status ServiceFlinkApplicationDeploymentStatusType `json:"status"` // Deployment status + VersionId string `json:"version_id"` // ApplicationVersion ID } + +// ServiceFlinkDeleteApplicationDeploymentOut ServiceFlinkDeleteApplicationDeploymentResponse type ServiceFlinkDeleteApplicationDeploymentOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - ErrorMsg *string `json:"error_msg,omitempty"` - Id string `json:"id"` - JobId *string `json:"job_id,omitempty"` - LastSavepoint *string `json:"last_savepoint,omitempty"` - Parallelism int `json:"parallelism"` - RestartEnabled bool `json:"restart_enabled"` - StartingSavepoint *string `json:"starting_savepoint,omitempty"` - Status ServiceFlinkApplicationDeploymentStatusType `json:"status"` - VersionId string `json:"version_id"` + CreatedAt time.Time `json:"created_at"` // Created at + CreatedBy string `json:"created_by"` // Created by + ErrorMsg *string `json:"error_msg,omitempty"` // Deployment error + Id string `json:"id"` // Deployment ID + JobId *string `json:"job_id,omitempty"` // Job ID + LastSavepoint *string `json:"last_savepoint,omitempty"` // Job savepoint + Parallelism int `json:"parallelism"` // Flink Job parallelism + RestartEnabled bool `json:"restart_enabled"` // Specifies whether a Flink Job is restarted in case it fails + StartingSavepoint *string `json:"starting_savepoint,omitempty"` // Job savepoint + Status ServiceFlinkApplicationDeploymentStatusType `json:"status"` // Deployment status + VersionId string `json:"version_id"` // ApplicationVersion ID } + +// ServiceFlinkGetApplicationDeploymentOut ServiceFlinkGetApplicationDeploymentResponse type ServiceFlinkGetApplicationDeploymentOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - ErrorMsg *string `json:"error_msg,omitempty"` - Id string `json:"id"` - JobId *string `json:"job_id,omitempty"` - LastSavepoint *string `json:"last_savepoint,omitempty"` - Parallelism int `json:"parallelism"` - RestartEnabled bool `json:"restart_enabled"` - StartingSavepoint *string `json:"starting_savepoint,omitempty"` - Status ServiceFlinkApplicationDeploymentStatusType `json:"status"` - VersionId string `json:"version_id"` + CreatedAt time.Time `json:"created_at"` // Created at + CreatedBy string `json:"created_by"` // Created by + ErrorMsg *string `json:"error_msg,omitempty"` // Deployment error + Id string `json:"id"` // Deployment ID + JobId *string `json:"job_id,omitempty"` // Job ID + LastSavepoint *string `json:"last_savepoint,omitempty"` // Job savepoint + Parallelism int `json:"parallelism"` // Flink Job parallelism + RestartEnabled bool `json:"restart_enabled"` // Specifies whether a Flink Job is restarted in case it fails + StartingSavepoint *string `json:"starting_savepoint,omitempty"` // Job savepoint + Status ServiceFlinkApplicationDeploymentStatusType `json:"status"` // Deployment status + VersionId string `json:"version_id"` // ApplicationVersion ID } + +// ServiceFlinkStopApplicationDeploymentOut ServiceFlinkStopApplicationDeploymentResponse type ServiceFlinkStopApplicationDeploymentOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - ErrorMsg *string `json:"error_msg,omitempty"` - Id string `json:"id"` - JobId *string `json:"job_id,omitempty"` - LastSavepoint *string `json:"last_savepoint,omitempty"` - Parallelism int `json:"parallelism"` - RestartEnabled bool `json:"restart_enabled"` - StartingSavepoint *string `json:"starting_savepoint,omitempty"` - Status ServiceFlinkApplicationDeploymentStatusType `json:"status"` - VersionId string `json:"version_id"` + CreatedAt time.Time `json:"created_at"` // Created at + CreatedBy string `json:"created_by"` // Created by + ErrorMsg *string `json:"error_msg,omitempty"` // Deployment error + Id string `json:"id"` // Deployment ID + JobId *string `json:"job_id,omitempty"` // Job ID + LastSavepoint *string `json:"last_savepoint,omitempty"` // Job savepoint + Parallelism int `json:"parallelism"` // Flink Job parallelism + RestartEnabled bool `json:"restart_enabled"` // Specifies whether a Flink Job is restarted in case it fails + StartingSavepoint *string `json:"starting_savepoint,omitempty"` // Job savepoint + Status ServiceFlinkApplicationDeploymentStatusType `json:"status"` // Deployment status + VersionId string `json:"version_id"` // ApplicationVersion ID } + +// serviceFlinkListApplicationDeploymentsOut ServiceFlinkListApplicationDeploymentsResponse type serviceFlinkListApplicationDeploymentsOut struct { - Deployments []DeploymentOut `json:"deployments"` + Deployments []DeploymentOut `json:"deployments"` // Flink ApplicationDeployments } diff --git a/handler/flinkapplicationversion/flinkapplicationversion.go b/handler/flinkapplicationversion/flinkapplicationversion.go index 4b6eb7a..1b9a972 100644 --- a/handler/flinkapplicationversion/flinkapplicationversion.go +++ b/handler/flinkapplicationversion/flinkapplicationversion.go @@ -98,105 +98,121 @@ func (h *FlinkApplicationVersionHandler) ServiceFlinkValidateApplicationVersion( } type ColumnOut struct { - DataType string `json:"data_type"` - Extras *string `json:"extras,omitempty"` - Key *string `json:"key,omitempty"` - Name string `json:"name"` - Nullable bool `json:"nullable"` - Watermark *string `json:"watermark,omitempty"` + DataType string `json:"data_type"` // The data type of the column + Extras *string `json:"extras,omitempty"` // Column extra information + Key *string `json:"key,omitempty"` // The key info of the column + Name string `json:"name"` // The name of the column + Nullable bool `json:"nullable"` // Whether the column is nullable, i.e. if true, the column is NOT NULL + Watermark *string `json:"watermark,omitempty"` // Information of the watermark if the column is used for watermark. } + +// PositionOut Error position in the SQL. type PositionOut struct { - CharacterNumber int `json:"character_number"` - EndCharacterNumber int `json:"end_character_number"` - EndLineNumber int `json:"end_line_number"` - LineNumber int `json:"line_number"` + CharacterNumber int `json:"character_number"` // Character number of where the error starts, starting from 1. + EndCharacterNumber int `json:"end_character_number"` // Character number of where the error starts, starting from 1. + EndLineNumber int `json:"end_line_number"` // Line number of where the error ends, starting from 1. + LineNumber int `json:"line_number"` // Line number of where the error starts, starting from 1. } + +// ServiceFlinkCreateApplicationVersionIn ServiceFlinkCreateApplicationVersionRequestBody type ServiceFlinkCreateApplicationVersionIn struct { Sinks []SinkIn `json:"sinks"` Sources []SourceIn `json:"sources"` - Statement string `json:"statement"` + Statement string `json:"statement"` // Job SQL statement } + +// ServiceFlinkCreateApplicationVersionOut ServiceFlinkCreateApplicationVersionResponse type ServiceFlinkCreateApplicationVersionOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - Id string `json:"id"` + CreatedAt time.Time `json:"created_at"` // Created at + CreatedBy string `json:"created_by"` // Created by + Id string `json:"id"` // ApplicationVersion ID Sinks []SinkOut `json:"sinks"` Sources []SourceOut `json:"sources"` - Statement string `json:"statement"` - Version int `json:"version"` + Statement string `json:"statement"` // Job SQL statement + Version int `json:"version"` // Version number } + +// ServiceFlinkDeleteApplicationVersionOut ServiceFlinkDeleteApplicationVersionResponse type ServiceFlinkDeleteApplicationVersionOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - Id string `json:"id"` + CreatedAt time.Time `json:"created_at"` // Created at + CreatedBy string `json:"created_by"` // Created by + Id string `json:"id"` // ApplicationVersion ID Sinks []SinkOut `json:"sinks"` Sources []SourceOut `json:"sources"` - Statement string `json:"statement"` - Version int `json:"version"` + Statement string `json:"statement"` // Job SQL statement + Version int `json:"version"` // Version number } + +// ServiceFlinkGetApplicationVersionOut ServiceFlinkGetApplicationVersionResponse type ServiceFlinkGetApplicationVersionOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - Id string `json:"id"` + CreatedAt time.Time `json:"created_at"` // Created at + CreatedBy string `json:"created_by"` // Created by + Id string `json:"id"` // ApplicationVersion ID Sinks []SinkOut `json:"sinks"` Sources []SourceOut `json:"sources"` - Statement string `json:"statement"` - Version int `json:"version"` + Statement string `json:"statement"` // Job SQL statement + Version int `json:"version"` // Version number } + +// ServiceFlinkValidateApplicationVersionIn ServiceFlinkValidateApplicationVersionRequestBody type ServiceFlinkValidateApplicationVersionIn struct { Sinks []SinkIn `json:"sinks"` Sources []SourceIn `json:"sources"` - Statement *string `json:"statement,omitempty"` + Statement *string `json:"statement,omitempty"` // Job SQL statement } + +// ServiceFlinkValidateApplicationVersionOut ServiceFlinkValidateApplicationVersionResponse type ServiceFlinkValidateApplicationVersionOut struct { - Sinks []SinkOutAlt `json:"sinks"` - Sources []SourceOutAlt `json:"sources"` - Statement *string `json:"statement,omitempty"` - StatementError *StatementErrorOut `json:"statement_error,omitempty"` + Sinks []SinkOutAlt `json:"sinks"` // Sinks and sink validation errors + Sources []SourceOutAlt `json:"sources"` // Sources and source validation errors + Statement *string `json:"statement,omitempty"` // Job SQL statement + StatementError *StatementErrorOut `json:"statement_error,omitempty"` // Job validation error } type SinkIn struct { - CreateTable string `json:"create_table"` - IntegrationId *string `json:"integration_id,omitempty"` + CreateTable string `json:"create_table"` // The CREATE TABLE statement + IntegrationId *string `json:"integration_id,omitempty"` // Integration ID } type SinkOut struct { Columns []ColumnOut `json:"columns"` - CreateTable string `json:"create_table"` - IntegrationId *string `json:"integration_id,omitempty"` - Options map[string]any `json:"options"` - TableId string `json:"table_id"` - TableName string `json:"table_name"` + CreateTable string `json:"create_table"` // The CREATE TABLE statement + IntegrationId *string `json:"integration_id,omitempty"` // Integration ID + Options map[string]any `json:"options"` // Option + TableId string `json:"table_id"` // Sink ID + TableName string `json:"table_name"` // Table name } type SinkOutAlt struct { Columns []ColumnOut `json:"columns,omitempty"` - CreateTable string `json:"create_table"` - IntegrationId *string `json:"integration_id,omitempty"` - Message *string `json:"message,omitempty"` - Options map[string]any `json:"options,omitempty"` - Position *PositionOut `json:"position,omitempty"` - TableName *string `json:"table_name,omitempty"` + CreateTable string `json:"create_table"` // The CREATE TABLE statement + IntegrationId *string `json:"integration_id,omitempty"` // Integration ID + Message *string `json:"message,omitempty"` // The error message. + Options map[string]any `json:"options,omitempty"` // Option + Position *PositionOut `json:"position,omitempty"` // Error position in the SQL. + TableName *string `json:"table_name,omitempty"` // Table name } type SourceIn struct { - CreateTable string `json:"create_table"` - IntegrationId *string `json:"integration_id,omitempty"` + CreateTable string `json:"create_table"` // The CREATE TABLE statement + IntegrationId *string `json:"integration_id,omitempty"` // Integration ID } type SourceOut struct { Columns []ColumnOut `json:"columns"` - CreateTable string `json:"create_table"` - IntegrationId *string `json:"integration_id,omitempty"` - Options map[string]any `json:"options"` - TableId string `json:"table_id"` - TableName string `json:"table_name"` + CreateTable string `json:"create_table"` // The CREATE TABLE statement + IntegrationId *string `json:"integration_id,omitempty"` // Integration ID + Options map[string]any `json:"options"` // Option + TableId string `json:"table_id"` // Source ID + TableName string `json:"table_name"` // Table name } type SourceOutAlt struct { Columns []ColumnOut `json:"columns,omitempty"` - CreateTable string `json:"create_table"` - IntegrationId *string `json:"integration_id,omitempty"` - Message *string `json:"message,omitempty"` - Options map[string]any `json:"options,omitempty"` - Position *PositionOut `json:"position,omitempty"` - TableName *string `json:"table_name,omitempty"` + CreateTable string `json:"create_table"` // The CREATE TABLE statement + IntegrationId *string `json:"integration_id,omitempty"` // Integration ID + Message *string `json:"message,omitempty"` // The error message. + Options map[string]any `json:"options,omitempty"` // Option + Position *PositionOut `json:"position,omitempty"` // Error position in the SQL. + TableName *string `json:"table_name,omitempty"` // Table name } + +// StatementErrorOut Job validation error type StatementErrorOut struct { - Message string `json:"message"` - Position *PositionOut `json:"position,omitempty"` + Message string `json:"message"` // The error message. + Position *PositionOut `json:"position,omitempty"` // Error position in the SQL. } diff --git a/handler/flinkjob/flinkjob.go b/handler/flinkjob/flinkjob.go index a726297..c78eff3 100644 --- a/handler/flinkjob/flinkjob.go +++ b/handler/flinkjob/flinkjob.go @@ -61,8 +61,8 @@ func (h *FlinkJobHandler) ServiceFlinkJobsList(ctx context.Context, project stri } type JobOut struct { - Id *string `json:"id,omitempty"` - Status JobStatusType `json:"status,omitempty"` + Id *string `json:"id,omitempty"` // Job ID + Status JobStatusType `json:"status,omitempty"` // Job status } type JobStatusType string @@ -84,18 +84,19 @@ func JobStatusTypeChoices() []string { return []string{"INITIALIZING", "CREATED", "RUNNING", "FAILING", "FAILED", "CANCELLING", "CANCELED", "FINISHED", "RESTARTING", "SUSPENDED", "RECONCILING"} } +// ServiceFlinkJobDetailsOut ServiceFlinkJobDetailsResponse type ServiceFlinkJobDetailsOut struct { - Duration *int `json:"duration,omitempty"` - EndTime *int `json:"end-time,omitempty"` - IsStoppable *bool `json:"isStoppable,omitempty"` - Jid *string `json:"jid,omitempty"` - MaxParallelism *int `json:"maxParallelism,omitempty"` - Name *string `json:"name,omitempty"` - Now *int `json:"now,omitempty"` + Duration *int `json:"duration,omitempty"` // Duration of the job + EndTime *int `json:"end-time,omitempty"` // End time of the job + IsStoppable *bool `json:"isStoppable,omitempty"` // Whether the job is stoppable + Jid *string `json:"jid,omitempty"` // Job ID + MaxParallelism *int `json:"maxParallelism,omitempty"` // Max parallelism + Name *string `json:"name,omitempty"` // Job name + Now *int `json:"now,omitempty"` // Epoch time Plan map[string]any `json:"plan,omitempty"` - StartTime *int `json:"start-time,omitempty"` - State ServiceFlinkJobDetailsStateType `json:"state,omitempty"` - StatusCounts *StatusCountsOut `json:"status-counts,omitempty"` + StartTime *int `json:"start-time,omitempty"` // Start time epoch + State ServiceFlinkJobDetailsStateType `json:"state,omitempty"` // Job state + StatusCounts *StatusCountsOut `json:"status-counts,omitempty"` // Status counts Timestamps map[string]any `json:"timestamps,omitempty"` Vertices []map[string]any `json:"vertices,omitempty"` } @@ -119,18 +120,21 @@ func ServiceFlinkJobDetailsStateTypeChoices() []string { return []string{"INITIALIZING", "CREATED", "RUNNING", "FAILING", "FAILED", "CANCELLING", "CANCELED", "FINISHED", "RESTARTING", "SUSPENDED", "RECONCILING"} } +// StatusCountsOut Status counts type StatusCountsOut struct { - Canceled *int `json:"CANCELED,omitempty"` - Canceling *int `json:"CANCELING,omitempty"` - Created *int `json:"CREATED,omitempty"` - Deploying *int `json:"DEPLOYING,omitempty"` - Failed *int `json:"FAILED,omitempty"` - Finished *int `json:"FINISHED,omitempty"` - Initializing *int `json:"INITIALIZING,omitempty"` - Reconciling *int `json:"RECONCILING,omitempty"` - Running *int `json:"RUNNING,omitempty"` - Scheduled *int `json:"SCHEDULED,omitempty"` + Canceled *int `json:"CANCELED,omitempty"` // CANCELED + Canceling *int `json:"CANCELING,omitempty"` // CANCELING + Created *int `json:"CREATED,omitempty"` // CREATED + Deploying *int `json:"DEPLOYING,omitempty"` // DEPLOYING + Failed *int `json:"FAILED,omitempty"` // FAILED + Finished *int `json:"FINISHED,omitempty"` // FINISHED + Initializing *int `json:"INITIALIZING,omitempty"` // INITIALIZING + Reconciling *int `json:"RECONCILING,omitempty"` // RECONCILING + Running *int `json:"RUNNING,omitempty"` // RUNNING + Scheduled *int `json:"SCHEDULED,omitempty"` // SCHEDULED } + +// serviceFlinkJobsListOut ServiceFlinkJobsListResponse type serviceFlinkJobsListOut struct { - Jobs []JobOut `json:"jobs,omitempty"` + Jobs []JobOut `json:"jobs,omitempty"` // Jobs } diff --git a/handler/kafka/kafka.go b/handler/kafka/kafka.go index ccf7848..fc7b874 100644 --- a/handler/kafka/kafka.go +++ b/handler/kafka/kafka.go @@ -189,15 +189,15 @@ func (h *KafkaHandler) ServiceKafkaTieredStorageSummary(ctx context.Context, pro } type AclOut struct { - Id *string `json:"id,omitempty"` - Permission PermissionType `json:"permission"` - Topic string `json:"topic"` + Id *string `json:"id,omitempty"` // ID + Permission PermissionType `json:"permission"` // Kafka permission + Topic string `json:"topic"` // Topic name pattern Username string `json:"username"` } type HourlyOut struct { - EstimatedCost *string `json:"estimated_cost,omitempty"` - HourStart string `json:"hour_start"` - PeakStoredBytes int `json:"peak_stored_bytes"` + EstimatedCost *string `json:"estimated_cost,omitempty"` // The estimated cost in USD of tiered storage for this hour + HourStart string `json:"hour_start"` // Timestamp in ISO 8601 format, always in UTC + PeakStoredBytes int `json:"peak_stored_bytes"` // Peak bytes stored on object storage at this hour } type PermissionType string @@ -213,59 +213,83 @@ func PermissionTypeChoices() []string { } type QuotaOut struct { - ClientId *string `json:"client-id,omitempty"` - ConsumerByteRate float64 `json:"consumer_byte_rate"` - ProducerByteRate float64 `json:"producer_byte_rate"` - RequestPercentage float64 `json:"request_percentage"` - User string `json:"user"` + ClientId *string `json:"client-id,omitempty"` // client-id + ConsumerByteRate float64 `json:"consumer_byte_rate"` // consumer network throttle + ProducerByteRate float64 `json:"producer_byte_rate"` // producer network throttle + RequestPercentage float64 `json:"request_percentage"` // cpu percentage throttle + User string `json:"user"` // user } + +// ServiceKafkaAclAddIn ServiceKafkaAclAddRequestBody type ServiceKafkaAclAddIn struct { - Permission PermissionType `json:"permission"` - Topic string `json:"topic"` + Permission PermissionType `json:"permission"` // Kafka permission + Topic string `json:"topic"` // Topic name pattern Username string `json:"username"` } + +// ServiceKafkaQuotaCreateIn ServiceKafkaQuotaCreateRequestBody type ServiceKafkaQuotaCreateIn struct { - ClientId *string `json:"client-id,omitempty"` - ConsumerByteRate *float64 `json:"consumer_byte_rate,omitempty"` - ProducerByteRate *float64 `json:"producer_byte_rate,omitempty"` - RequestPercentage *float64 `json:"request_percentage,omitempty"` - User *string `json:"user,omitempty"` + ClientId *string `json:"client-id,omitempty"` // client-id + ConsumerByteRate *float64 `json:"consumer_byte_rate,omitempty"` // consumer network throttle + ProducerByteRate *float64 `json:"producer_byte_rate,omitempty"` // producer network throttle + RequestPercentage *float64 `json:"request_percentage,omitempty"` // cpu percentage throttle + User *string `json:"user,omitempty"` // user } + +// ServiceKafkaQuotaDescribeOut kafka quota type ServiceKafkaQuotaDescribeOut struct { - ClientId *string `json:"client-id,omitempty"` - ConsumerByteRate float64 `json:"consumer_byte_rate"` - ProducerByteRate float64 `json:"producer_byte_rate"` - RequestPercentage float64 `json:"request_percentage"` - User string `json:"user"` + ClientId *string `json:"client-id,omitempty"` // client-id + ConsumerByteRate float64 `json:"consumer_byte_rate"` // consumer network throttle + ProducerByteRate float64 `json:"producer_byte_rate"` // producer network throttle + RequestPercentage float64 `json:"request_percentage"` // cpu percentage throttle + User string `json:"user"` // user } + +// ServiceKafkaTieredStorageSummaryOut ServiceKafkaTieredStorageSummaryResponse type ServiceKafkaTieredStorageSummaryOut struct { - CurrentCost string `json:"current_cost"` - ForecastedCost string `json:"forecasted_cost"` - ForecastedRate *string `json:"forecasted_rate,omitempty"` - StorageUsageHistory StorageUsageHistoryOut `json:"storage_usage_history"` - TotalStorageUsage int `json:"total_storage_usage"` + CurrentCost string `json:"current_cost"` // The current cost in USD of tiered storage since the beginning of the billing period + ForecastedCost string `json:"forecasted_cost"` // The forecasted cost in USD of tiered storage in the billing period + ForecastedRate *string `json:"forecasted_rate,omitempty"` // The rate on GBs/hour used to calculate the forecasted cost + StorageUsageHistory StorageUsageHistoryOut `json:"storage_usage_history"` // History of usage and cumulative costs in the billing period + TotalStorageUsage int `json:"total_storage_usage"` // Total storage usage by tiered storage, in bytes } + +// StorageUsageHistoryOut History of usage and cumulative costs in the billing period type StorageUsageHistoryOut struct { - Hourly []HourlyOut `json:"hourly"` + Hourly []HourlyOut `json:"hourly"` // History by hour } + +// serviceKafkaAclAddOut ServiceKafkaAclAddResponse type serviceKafkaAclAddOut struct { - Acl []AclOut `json:"acl"` + Acl []AclOut `json:"acl"` // List of Kafka ACL entries } + +// serviceKafkaAclDeleteOut ServiceKafkaAclDeleteResponse type serviceKafkaAclDeleteOut struct { - Acl []AclOut `json:"acl"` + Acl []AclOut `json:"acl"` // List of Kafka ACL entries } + +// serviceKafkaAclListOut ServiceKafkaAclListResponse type serviceKafkaAclListOut struct { - Acl []AclOut `json:"acl"` + Acl []AclOut `json:"acl"` // List of Kafka ACL entries } + +// serviceKafkaQuotaDescribeOut ServiceKafkaQuotaDescribeResponse type serviceKafkaQuotaDescribeOut struct { - Quota ServiceKafkaQuotaDescribeOut `json:"quota"` + Quota ServiceKafkaQuotaDescribeOut `json:"quota"` // kafka quota } + +// serviceKafkaQuotaListOut ServiceKafkaQuotaListResponse type serviceKafkaQuotaListOut struct { - Quotas []QuotaOut `json:"quotas"` + Quotas []QuotaOut `json:"quotas"` // List of kafka quotas } + +// serviceKafkaTieredStorageUsageByTopicOut ServiceKafkaTieredStorageStorageUsageByTopicResponse type serviceKafkaTieredStorageUsageByTopicOut struct { - StorageUsage map[string]any `json:"storage_usage"` + StorageUsage map[string]any `json:"storage_usage"` // Storage usage by tiered storage by topics } + +// serviceKafkaTieredStorageUsageTotalOut ServiceKafkaTieredStorageStorageUsageTotalResponse type serviceKafkaTieredStorageUsageTotalOut struct { - TotalStorageUsage int `json:"total_storage_usage"` + TotalStorageUsage int `json:"total_storage_usage"` // Total storage usage by tiered storage, in bytes } diff --git a/handler/kafkaconnect/kafkaconnect.go b/handler/kafkaconnect/kafkaconnect.go index ca9a065..2a1dbb5 100644 --- a/handler/kafkaconnect/kafkaconnect.go +++ b/handler/kafkaconnect/kafkaconnect.go @@ -28,7 +28,7 @@ type Handler interface { // ServiceKafkaConnectGetAvailableConnectors get available Kafka Connect connectors // GET /v1/project/{project}/service/{service_name}/available-connectors // https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceKafkaConnectGetAvailableConnectors - ServiceKafkaConnectGetAvailableConnectors(ctx context.Context, project string, serviceName string) ([]PluginOut, error) + ServiceKafkaConnectGetAvailableConnectors(ctx context.Context, project string, serviceName string) ([]PluginOutAlt, error) // ServiceKafkaConnectGetConnectorConfiguration get Kafka Connect connector configuration schema // GET /v1/project/{project}/service/{service_name}/connector-plugins/{connector_name}/configuration @@ -109,7 +109,7 @@ func (h *KafkaConnectHandler) ServiceKafkaConnectEditConnector(ctx context.Conte } return &out.Connector, nil } -func (h *KafkaConnectHandler) ServiceKafkaConnectGetAvailableConnectors(ctx context.Context, project string, serviceName string) ([]PluginOut, error) { +func (h *KafkaConnectHandler) ServiceKafkaConnectGetAvailableConnectors(ctx context.Context, project string, serviceName string) ([]PluginOutAlt, error) { path := fmt.Sprintf("/v1/project/%s/service/%s/available-connectors", url.PathEscape(project), url.PathEscape(serviceName)) b, err := h.doer.Do(ctx, "ServiceKafkaConnectGetAvailableConnectors", "GET", path, nil) if err != nil { @@ -182,21 +182,22 @@ func (h *KafkaConnectHandler) ServiceKafkaConnectResumeConnector(ctx context.Con return err } +// ConfigOut Connector configuration parameters type ConfigOut struct { - ConnectorClass *string `json:"connector.class,omitempty"` - Name string `json:"name"` + ConnectorClass *string `json:"connector.class,omitempty"` // The Java class for the connector + Name string `json:"name"` // Unique name for the connector } type ConfigurationSchemaOut struct { - DefaultValue string `json:"default_value"` - DisplayName string `json:"display_name"` - Documentation string `json:"documentation"` - Group string `json:"group"` - Importance ImportanceType `json:"importance"` - Name string `json:"name"` - Order int `json:"order"` - Required bool `json:"required"` - Type ConfigurationSchemaType `json:"type"` - Width WidthType `json:"width"` + DefaultValue string `json:"default_value"` // Default value to be set if field omitted in configuration + DisplayName string `json:"display_name"` // Human friendly name of the field + Documentation string `json:"documentation"` // Assisting help text + Group string `json:"group"` // Name of the field group to which the field belongs to + Importance ImportanceType `json:"importance"` // How important is the field + Name string `json:"name"` // Machine friendly name of the field + Order int `json:"order"` // Position of the field in the configuration form + Required bool `json:"required"` // Defines if the field value is mandatory or not + Type ConfigurationSchemaType `json:"type"` // Configuration value type + Width WidthType `json:"width"` // Expected length of the input value } type ConfigurationSchemaType string @@ -217,10 +218,10 @@ func ConfigurationSchemaTypeChoices() []string { } type ConnectorOut struct { - Config ConfigOut `json:"config"` - Name string `json:"name"` - Plugin PluginOut `json:"plugin"` - Tasks []TaskOut `json:"tasks"` + Config ConfigOut `json:"config"` // Connector configuration parameters + Name string `json:"name"` // Connector name + Plugin PluginOut `json:"plugin"` // Kafka Connector plugin information + Tasks []TaskOut `json:"tasks"` // List of tasks of a connector } type ImportanceType string @@ -234,15 +235,26 @@ func ImportanceTypeChoices() []string { return []string{"LOW", "MEDIUM", "HIGH"} } +// PluginOut Kafka Connector plugin information type PluginOut struct { - Author string `json:"author"` - Class string `json:"class"` - DocUrl string `json:"docURL"` - Preview *bool `json:"preview,omitempty"` - PreviewInfo *string `json:"preview_info,omitempty"` - Title string `json:"title"` - Type PluginType `json:"type"` - Version string `json:"version"` + Author string `json:"author"` // Connector author name + Class string `json:"class"` // Connector class name + DocUrl string `json:"docURL"` // Connector documentation URL + Preview *bool `json:"preview,omitempty"` // Describes if connector is in beta + PreviewInfo *string `json:"preview_info,omitempty"` // Information about beta stage of connector + Title string `json:"title"` // Descriptive human readable name defined by Aiven + Type PluginType `json:"type"` // Describes whether data flows from or to Kafka + Version string `json:"version"` // Connector version number +} +type PluginOutAlt struct { + Author string `json:"author"` // Connector author name + Class string `json:"class"` // Connector class name + DocUrl string `json:"docURL"` // Connector documentation URL + Preview *bool `json:"preview,omitempty"` // Describes if connector is in beta + PreviewInfo *string `json:"preview_info,omitempty"` // Information about beta stage of connector + Title string `json:"title"` // Descriptive human readable name defined by Aiven + Type PluginType `json:"type"` // Describes whether data flows from or to Kafka + Version string `json:"version"` // Connector version number } type PluginType string @@ -269,38 +281,47 @@ func ServiceKafkaConnectConnectorStateTypeChoices() []string { return []string{"FAILED", "PAUSED", "RUNNING", "UNASSIGNED"} } +// ServiceKafkaConnectCreateConnectorIn ServiceKafkaConnectCreateConnectorRequestBody type ServiceKafkaConnectCreateConnectorIn struct { - ConnectorClass *string `json:"connector.class,omitempty"` - Name string `json:"name"` + ConnectorClass *string `json:"connector.class,omitempty"` // The Java class for the connector + Name string `json:"name"` // Unique name for the connector } + +// ServiceKafkaConnectCreateConnectorOut Kafka connector information type ServiceKafkaConnectCreateConnectorOut struct { - Config ConfigOut `json:"config"` - Name string `json:"name"` - Plugin PluginOut `json:"plugin"` - Tasks []TaskOut `json:"tasks"` + Config ConfigOut `json:"config"` // Connector configuration parameters + Name string `json:"name"` // Connector name + Plugin PluginOut `json:"plugin"` // Kafka Connector plugin information + Tasks []TaskOut `json:"tasks"` // List of tasks of a connector } + +// ServiceKafkaConnectEditConnectorIn ServiceKafkaConnectEditConnectorRequestBody type ServiceKafkaConnectEditConnectorIn struct { - ConnectorClass *string `json:"connector.class,omitempty"` - Name string `json:"name"` + ConnectorClass *string `json:"connector.class,omitempty"` // The Java class for the connector + Name string `json:"name"` // Unique name for the connector } + +// ServiceKafkaConnectEditConnectorOut Kafka connector information type ServiceKafkaConnectEditConnectorOut struct { - Config ConfigOut `json:"config"` - Name string `json:"name"` - Plugin PluginOut `json:"plugin"` - Tasks []TaskOut `json:"tasks"` + Config ConfigOut `json:"config"` // Connector configuration parameters + Name string `json:"name"` // Connector name + Plugin PluginOut `json:"plugin"` // Kafka Connector plugin information + Tasks []TaskOut `json:"tasks"` // List of tasks of a connector } + +// ServiceKafkaConnectGetConnectorStatusOut Connector status information type ServiceKafkaConnectGetConnectorStatusOut struct { - State ServiceKafkaConnectConnectorStateType `json:"state"` - Tasks []TaskOutAlt `json:"tasks"` + State ServiceKafkaConnectConnectorStateType `json:"state"` // Current status of the connector + Tasks []TaskOutAlt `json:"tasks"` // List of tasks currently running for the connector } type TaskOut struct { - Connector string `json:"connector"` - Task int `json:"task"` + Connector string `json:"connector"` // Related connector name + Task int `json:"task"` // Task id / number } type TaskOutAlt struct { - Id int `json:"id"` - State TaskStateType `json:"state"` - Trace string `json:"trace"` + Id int `json:"id"` // Task identifier + State TaskStateType `json:"state"` // Current status of the task + Trace string `json:"trace"` // Task error information } type TaskStateType string @@ -328,21 +349,32 @@ func WidthTypeChoices() []string { return []string{"NONE", "SHORT", "MEDIUM", "LONG"} } +// serviceKafkaConnectCreateConnectorOut ServiceKafkaConnectCreateConnectorResponse type serviceKafkaConnectCreateConnectorOut struct { - Connector ServiceKafkaConnectCreateConnectorOut `json:"connector"` + Connector ServiceKafkaConnectCreateConnectorOut `json:"connector"` // Kafka connector information } + +// serviceKafkaConnectEditConnectorOut ServiceKafkaConnectEditConnectorResponse type serviceKafkaConnectEditConnectorOut struct { - Connector ServiceKafkaConnectEditConnectorOut `json:"connector"` + Connector ServiceKafkaConnectEditConnectorOut `json:"connector"` // Kafka connector information } + +// serviceKafkaConnectGetAvailableConnectorsOut ServiceKafkaConnectGetAvailableConnectorsResponse type serviceKafkaConnectGetAvailableConnectorsOut struct { - Plugins []PluginOut `json:"plugins"` + Plugins []PluginOutAlt `json:"plugins"` // List of available Kafka Connect connector plugins } + +// serviceKafkaConnectGetConnectorConfigurationOut ServiceKafkaConnectGetConnectorConfigurationResponse type serviceKafkaConnectGetConnectorConfigurationOut struct { - ConfigurationSchema []ConfigurationSchemaOut `json:"configuration_schema"` + ConfigurationSchema []ConfigurationSchemaOut `json:"configuration_schema"` // List of connector configuration field definitions } + +// serviceKafkaConnectGetConnectorStatusOut ServiceKafkaConnectGetConnectorStatusResponse type serviceKafkaConnectGetConnectorStatusOut struct { - Status ServiceKafkaConnectGetConnectorStatusOut `json:"status"` + Status ServiceKafkaConnectGetConnectorStatusOut `json:"status"` // Connector status information } + +// serviceKafkaConnectListOut ServiceKafkaConnectListResponse type serviceKafkaConnectListOut struct { - Connectors []ConnectorOut `json:"connectors"` + Connectors []ConnectorOut `json:"connectors"` // List of active Kafka Connect connectors } diff --git a/handler/kafkamirrormaker/kafkamirrormaker.go b/handler/kafkamirrormaker/kafkamirrormaker.go index 87ce089..94bd12c 100644 --- a/handler/kafkamirrormaker/kafkamirrormaker.go +++ b/handler/kafkamirrormaker/kafkamirrormaker.go @@ -110,21 +110,25 @@ func OffsetSyncsTopicLocationTypeChoices() []string { } type ReplicationFlowOut struct { - ConfigPropertiesExclude *string `json:"config_properties_exclude,omitempty"` - EmitBackwardHeartbeatsEnabled *bool `json:"emit_backward_heartbeats_enabled,omitempty"` - EmitHeartbeatsEnabled *bool `json:"emit_heartbeats_enabled,omitempty"` - Enabled bool `json:"enabled"` - OffsetLagMax *int `json:"offset_lag_max,omitempty"` - OffsetSyncsTopicLocation OffsetSyncsTopicLocationType `json:"offset_syncs_topic_location,omitempty"` - ReplicationFactor *int `json:"replication_factor,omitempty"` - ReplicationPolicyClass ReplicationPolicyClassType `json:"replication_policy_class,omitempty"` - ReplicationProgress *float64 `json:"replication_progress,omitempty"` - SourceCluster string `json:"source_cluster"` - SyncGroupOffsetsEnabled *bool `json:"sync_group_offsets_enabled,omitempty"` - SyncGroupOffsetsIntervalSeconds *int `json:"sync_group_offsets_interval_seconds,omitempty"` - TargetCluster string `json:"target_cluster"` - Topics []string `json:"topics,omitempty"` - TopicsBlacklist []string `json:"topics.blacklist,omitempty"` + ConfigPropertiesExclude *string `json:"config_properties_exclude,omitempty"` // Topic configuration properties that should not be replicated + EmitBackwardHeartbeatsEnabled *bool `json:"emit_backward_heartbeats_enabled,omitempty"` // Emit backward heartbeats enabled + EmitHeartbeatsEnabled *bool `json:"emit_heartbeats_enabled,omitempty"` // Emit heartbeats enabled + Enabled bool `json:"enabled"` // Is replication flow enabled + OffsetLagMax *int `json:"offset_lag_max,omitempty"` // How out-of-sync a remote partition can be before it is resynced + OffsetSyncsTopicLocation OffsetSyncsTopicLocationType `json:"offset_syncs_topic_location,omitempty"` // Offset syncs topic location + ReplicationFactor *int `json:"replication_factor,omitempty"` // Replication factor + ReplicationPolicyClass ReplicationPolicyClassType `json:"replication_policy_class,omitempty"` // Replication policy class + ReplicationProgress *float64 `json:"replication_progress,omitempty"` // Replication progress + SourceCluster string `json:"source_cluster"` // Source cluster alias + SyncGroupOffsetsEnabled *bool `json:"sync_group_offsets_enabled,omitempty"` // Sync consumer group offsets + SyncGroupOffsetsIntervalSeconds *int `json:"sync_group_offsets_interval_seconds,omitempty"` // Frequency of consumer group offset sync + TargetCluster string `json:"target_cluster"` // Target cluster alias + Topics []string `json:"topics,omitempty"` /* + List of topics and/or regular expressions to replicate. + + Topic names and regular expressions that match topic names that should be replicated. MirrorMaker will replicate these topics if they are not matched by "topics.blacklist". Currently defaults to [".*"]. + */ + TopicsBlacklist []string `json:"topics.blacklist,omitempty"` // Topic or topic regular expression matching topic } type ReplicationPolicyClassType string @@ -137,76 +141,109 @@ func ReplicationPolicyClassTypeChoices() []string { return []string{"org.apache.kafka.connect.mirror.DefaultReplicationPolicy", "org.apache.kafka.connect.mirror.IdentityReplicationPolicy"} } +// ServiceKafkaMirrorMakerCreateReplicationFlowIn ServiceKafkaMirrorMakerCreateReplicationFlowRequestBody type ServiceKafkaMirrorMakerCreateReplicationFlowIn struct { - ConfigPropertiesExclude *string `json:"config_properties_exclude,omitempty"` - EmitBackwardHeartbeatsEnabled *bool `json:"emit_backward_heartbeats_enabled,omitempty"` - EmitHeartbeatsEnabled *bool `json:"emit_heartbeats_enabled,omitempty"` - Enabled bool `json:"enabled"` - OffsetLagMax *int `json:"offset_lag_max,omitempty"` - OffsetSyncsTopicLocation OffsetSyncsTopicLocationType `json:"offset_syncs_topic_location,omitempty"` - ReplicationFactor *int `json:"replication_factor,omitempty"` - ReplicationPolicyClass ReplicationPolicyClassType `json:"replication_policy_class,omitempty"` - SourceCluster string `json:"source_cluster"` - SyncGroupOffsetsEnabled *bool `json:"sync_group_offsets_enabled,omitempty"` - SyncGroupOffsetsIntervalSeconds *int `json:"sync_group_offsets_interval_seconds,omitempty"` - TargetCluster string `json:"target_cluster"` - Topics *[]string `json:"topics,omitempty"` - TopicsBlacklist *[]string `json:"topics.blacklist,omitempty"` -} + ConfigPropertiesExclude *string `json:"config_properties_exclude,omitempty"` // Topic configuration properties that should not be replicated + EmitBackwardHeartbeatsEnabled *bool `json:"emit_backward_heartbeats_enabled,omitempty"` // Emit backward heartbeats enabled + EmitHeartbeatsEnabled *bool `json:"emit_heartbeats_enabled,omitempty"` // Emit heartbeats enabled + Enabled bool `json:"enabled"` // Is replication flow enabled + OffsetLagMax *int `json:"offset_lag_max,omitempty"` // How out-of-sync a remote partition can be before it is resynced + OffsetSyncsTopicLocation OffsetSyncsTopicLocationType `json:"offset_syncs_topic_location,omitempty"` // Offset syncs topic location + ReplicationFactor *int `json:"replication_factor,omitempty"` // Replication factor + ReplicationPolicyClass ReplicationPolicyClassType `json:"replication_policy_class,omitempty"` // Replication policy class + SourceCluster string `json:"source_cluster"` // Source cluster alias + SyncGroupOffsetsEnabled *bool `json:"sync_group_offsets_enabled,omitempty"` // Sync consumer group offsets + SyncGroupOffsetsIntervalSeconds *int `json:"sync_group_offsets_interval_seconds,omitempty"` // Frequency of consumer group offset sync + TargetCluster string `json:"target_cluster"` // Target cluster alias + Topics *[]string `json:"topics,omitempty"` /* + List of topics and/or regular expressions to replicate. + + Topic names and regular expressions that match topic names that should be replicated. MirrorMaker will replicate these topics if they are not matched by "topics.blacklist". Currently defaults to [".*"]. + */ + TopicsBlacklist *[]string `json:"topics.blacklist,omitempty"` // Topic or topic regular expression matching topic +} + +// ServiceKafkaMirrorMakerGetReplicationFlowOut Replication flow type ServiceKafkaMirrorMakerGetReplicationFlowOut struct { - ConfigPropertiesExclude *string `json:"config_properties_exclude,omitempty"` - EmitBackwardHeartbeatsEnabled *bool `json:"emit_backward_heartbeats_enabled,omitempty"` - EmitHeartbeatsEnabled *bool `json:"emit_heartbeats_enabled,omitempty"` - Enabled bool `json:"enabled"` - OffsetLagMax *int `json:"offset_lag_max,omitempty"` - OffsetSyncsTopicLocation OffsetSyncsTopicLocationType `json:"offset_syncs_topic_location,omitempty"` - ReplicationFactor *int `json:"replication_factor,omitempty"` - ReplicationPolicyClass ReplicationPolicyClassType `json:"replication_policy_class,omitempty"` - ReplicationProgress *float64 `json:"replication_progress,omitempty"` - SourceCluster string `json:"source_cluster"` - SyncGroupOffsetsEnabled *bool `json:"sync_group_offsets_enabled,omitempty"` - SyncGroupOffsetsIntervalSeconds *int `json:"sync_group_offsets_interval_seconds,omitempty"` - TargetCluster string `json:"target_cluster"` - Topics []string `json:"topics,omitempty"` - TopicsBlacklist []string `json:"topics.blacklist,omitempty"` -} + ConfigPropertiesExclude *string `json:"config_properties_exclude,omitempty"` // Topic configuration properties that should not be replicated + EmitBackwardHeartbeatsEnabled *bool `json:"emit_backward_heartbeats_enabled,omitempty"` // Emit backward heartbeats enabled + EmitHeartbeatsEnabled *bool `json:"emit_heartbeats_enabled,omitempty"` // Emit heartbeats enabled + Enabled bool `json:"enabled"` // Is replication flow enabled + OffsetLagMax *int `json:"offset_lag_max,omitempty"` // How out-of-sync a remote partition can be before it is resynced + OffsetSyncsTopicLocation OffsetSyncsTopicLocationType `json:"offset_syncs_topic_location,omitempty"` // Offset syncs topic location + ReplicationFactor *int `json:"replication_factor,omitempty"` // Replication factor + ReplicationPolicyClass ReplicationPolicyClassType `json:"replication_policy_class,omitempty"` // Replication policy class + ReplicationProgress *float64 `json:"replication_progress,omitempty"` // Replication progress + SourceCluster string `json:"source_cluster"` // Source cluster alias + SyncGroupOffsetsEnabled *bool `json:"sync_group_offsets_enabled,omitempty"` // Sync consumer group offsets + SyncGroupOffsetsIntervalSeconds *int `json:"sync_group_offsets_interval_seconds,omitempty"` // Frequency of consumer group offset sync + TargetCluster string `json:"target_cluster"` // Target cluster alias + Topics []string `json:"topics,omitempty"` /* + List of topics and/or regular expressions to replicate. + + Topic names and regular expressions that match topic names that should be replicated. MirrorMaker will replicate these topics if they are not matched by "topics.blacklist". Currently defaults to [".*"]. + */ + TopicsBlacklist []string `json:"topics.blacklist,omitempty"` // Topic or topic regular expression matching topic +} + +// ServiceKafkaMirrorMakerPatchReplicationFlowIn ServiceKafkaMirrorMakerPatchReplicationFlowRequestBody type ServiceKafkaMirrorMakerPatchReplicationFlowIn struct { - ConfigPropertiesExclude *string `json:"config_properties_exclude,omitempty"` - EmitBackwardHeartbeatsEnabled *bool `json:"emit_backward_heartbeats_enabled,omitempty"` - EmitHeartbeatsEnabled *bool `json:"emit_heartbeats_enabled,omitempty"` - Enabled *bool `json:"enabled,omitempty"` - OffsetLagMax *int `json:"offset_lag_max,omitempty"` - OffsetSyncsTopicLocation OffsetSyncsTopicLocationType `json:"offset_syncs_topic_location,omitempty"` - ReplicationFactor *int `json:"replication_factor,omitempty"` - ReplicationPolicyClass ReplicationPolicyClassType `json:"replication_policy_class,omitempty"` - SyncGroupOffsetsEnabled *bool `json:"sync_group_offsets_enabled,omitempty"` - SyncGroupOffsetsIntervalSeconds *int `json:"sync_group_offsets_interval_seconds,omitempty"` - Topics *[]string `json:"topics,omitempty"` - TopicsBlacklist *[]string `json:"topics.blacklist,omitempty"` -} + ConfigPropertiesExclude *string `json:"config_properties_exclude,omitempty"` // Topic configuration properties that should not be replicated + EmitBackwardHeartbeatsEnabled *bool `json:"emit_backward_heartbeats_enabled,omitempty"` // Emit backward heartbeats enabled + EmitHeartbeatsEnabled *bool `json:"emit_heartbeats_enabled,omitempty"` // Emit heartbeats enabled + Enabled *bool `json:"enabled,omitempty"` // Is replication flow enabled + OffsetLagMax *int `json:"offset_lag_max,omitempty"` // How out-of-sync a remote partition can be before it is resynced + OffsetSyncsTopicLocation OffsetSyncsTopicLocationType `json:"offset_syncs_topic_location,omitempty"` // Offset syncs topic location + ReplicationFactor *int `json:"replication_factor,omitempty"` // Replication factor + ReplicationPolicyClass ReplicationPolicyClassType `json:"replication_policy_class,omitempty"` // Replication policy class + SyncGroupOffsetsEnabled *bool `json:"sync_group_offsets_enabled,omitempty"` // Sync consumer group offsets + SyncGroupOffsetsIntervalSeconds *int `json:"sync_group_offsets_interval_seconds,omitempty"` // Frequency of consumer group offset sync + Topics *[]string `json:"topics,omitempty"` /* + List of topics and/or regular expressions to replicate. + + Topic names and regular expressions that match topic names that should be replicated. MirrorMaker will replicate these topics if they are not matched by "topics.blacklist". Currently defaults to [".*"]. + */ + TopicsBlacklist *[]string `json:"topics.blacklist,omitempty"` // Topic or topic regular expression matching topic +} + +// ServiceKafkaMirrorMakerPatchReplicationFlowOut Replication flow type ServiceKafkaMirrorMakerPatchReplicationFlowOut struct { - ConfigPropertiesExclude *string `json:"config_properties_exclude,omitempty"` - EmitBackwardHeartbeatsEnabled *bool `json:"emit_backward_heartbeats_enabled,omitempty"` - EmitHeartbeatsEnabled *bool `json:"emit_heartbeats_enabled,omitempty"` - Enabled bool `json:"enabled"` - OffsetLagMax *int `json:"offset_lag_max,omitempty"` - OffsetSyncsTopicLocation OffsetSyncsTopicLocationType `json:"offset_syncs_topic_location,omitempty"` - ReplicationFactor *int `json:"replication_factor,omitempty"` - ReplicationPolicyClass ReplicationPolicyClassType `json:"replication_policy_class,omitempty"` - ReplicationProgress *float64 `json:"replication_progress,omitempty"` - SourceCluster string `json:"source_cluster"` - SyncGroupOffsetsEnabled *bool `json:"sync_group_offsets_enabled,omitempty"` - SyncGroupOffsetsIntervalSeconds *int `json:"sync_group_offsets_interval_seconds,omitempty"` - TargetCluster string `json:"target_cluster"` - Topics []string `json:"topics,omitempty"` - TopicsBlacklist []string `json:"topics.blacklist,omitempty"` -} + ConfigPropertiesExclude *string `json:"config_properties_exclude,omitempty"` // Topic configuration properties that should not be replicated + EmitBackwardHeartbeatsEnabled *bool `json:"emit_backward_heartbeats_enabled,omitempty"` // Emit backward heartbeats enabled + EmitHeartbeatsEnabled *bool `json:"emit_heartbeats_enabled,omitempty"` // Emit heartbeats enabled + Enabled bool `json:"enabled"` // Is replication flow enabled + OffsetLagMax *int `json:"offset_lag_max,omitempty"` // How out-of-sync a remote partition can be before it is resynced + OffsetSyncsTopicLocation OffsetSyncsTopicLocationType `json:"offset_syncs_topic_location,omitempty"` // Offset syncs topic location + ReplicationFactor *int `json:"replication_factor,omitempty"` // Replication factor + ReplicationPolicyClass ReplicationPolicyClassType `json:"replication_policy_class,omitempty"` // Replication policy class + ReplicationProgress *float64 `json:"replication_progress,omitempty"` // Replication progress + SourceCluster string `json:"source_cluster"` // Source cluster alias + SyncGroupOffsetsEnabled *bool `json:"sync_group_offsets_enabled,omitempty"` // Sync consumer group offsets + SyncGroupOffsetsIntervalSeconds *int `json:"sync_group_offsets_interval_seconds,omitempty"` // Frequency of consumer group offset sync + TargetCluster string `json:"target_cluster"` // Target cluster alias + Topics []string `json:"topics,omitempty"` /* + List of topics and/or regular expressions to replicate. + + Topic names and regular expressions that match topic names that should be replicated. MirrorMaker will replicate these topics if they are not matched by "topics.blacklist". Currently defaults to [".*"]. + */ + TopicsBlacklist []string `json:"topics.blacklist,omitempty"` // Topic or topic regular expression matching topic +} + +// serviceKafkaMirrorMakerGetReplicationFlowOut ServiceKafkaMirrorMakerGetReplicationFlowResponse type serviceKafkaMirrorMakerGetReplicationFlowOut struct { - ReplicationFlow ServiceKafkaMirrorMakerGetReplicationFlowOut `json:"replication_flow"` + ReplicationFlow ServiceKafkaMirrorMakerGetReplicationFlowOut `json:"replication_flow"` // Replication flow } + +// serviceKafkaMirrorMakerGetReplicationFlowsOut ServiceKafkaMirrorMakerGetReplicationFlowsResponse type serviceKafkaMirrorMakerGetReplicationFlowsOut struct { - ReplicationFlows []ReplicationFlowOut `json:"replication_flows"` + ReplicationFlows []ReplicationFlowOut `json:"replication_flows"` /* + Replication flows + + Describes data replication flows between Kafka clusters + */ } + +// serviceKafkaMirrorMakerPatchReplicationFlowOut ServiceKafkaMirrorMakerPatchReplicationFlowResponse type serviceKafkaMirrorMakerPatchReplicationFlowOut struct { - ReplicationFlow ServiceKafkaMirrorMakerPatchReplicationFlowOut `json:"replication_flow"` + ReplicationFlow ServiceKafkaMirrorMakerPatchReplicationFlowOut `json:"replication_flow"` // Replication flow } diff --git a/handler/kafkaschemaregistry/kafkaschemaregistry.go b/handler/kafkaschemaregistry/kafkaschemaregistry.go index 2c2e67d..336b5e5 100644 --- a/handler/kafkaschemaregistry/kafkaschemaregistry.go +++ b/handler/kafkaschemaregistry/kafkaschemaregistry.go @@ -263,9 +263,9 @@ func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjects(ctx context.C } type AclOut struct { - Id *string `json:"id,omitempty"` - Permission PermissionType `json:"permission"` - Resource string `json:"resource"` + Id *string `json:"id,omitempty"` // ID + Permission PermissionType `json:"permission"` // ACL entry for Schema Registry + Resource string `json:"resource"` // Schema Registry ACL entry resource name pattern Username string `json:"username"` } type CompatibilityType string @@ -312,56 +312,87 @@ func SchemaTypeChoices() []string { return []string{"AVRO", "JSON", "PROTOBUF"} } +// ServiceSchemaRegistryAclAddIn ServiceSchemaRegistryAclAddRequestBody type ServiceSchemaRegistryAclAddIn struct { - Permission PermissionType `json:"permission"` - Resource string `json:"resource"` + Permission PermissionType `json:"permission"` // ACL entry for Schema Registry + Resource string `json:"resource"` // Schema Registry ACL entry resource name pattern Username string `json:"username"` } + +// ServiceSchemaRegistryCompatibilityIn ServiceSchemaRegistryCompatibilityRequestBody type ServiceSchemaRegistryCompatibilityIn struct { Schema string `json:"schema"` - SchemaType SchemaType `json:"schemaType,omitempty"` + SchemaType SchemaType `json:"schemaType,omitempty"` // Schema type } + +// ServiceSchemaRegistryGlobalConfigPutIn ServiceSchemaRegistryGlobalConfigPutRequestBody type ServiceSchemaRegistryGlobalConfigPutIn struct { - Compatibility CompatibilityType `json:"compatibility"` + Compatibility CompatibilityType `json:"compatibility"` // Configuration } + +// ServiceSchemaRegistrySubjectConfigPutIn ServiceSchemaRegistrySubjectConfigPutRequestBody type ServiceSchemaRegistrySubjectConfigPutIn struct { - Compatibility CompatibilityType `json:"compatibility"` + Compatibility CompatibilityType `json:"compatibility"` // Configuration } + +// ServiceSchemaRegistrySubjectVersionPostIn ServiceSchemaRegistrySubjectVersionPostRequestBody type ServiceSchemaRegistrySubjectVersionPostIn struct { - References *[]ReferenceIn `json:"references,omitempty"` + References *[]ReferenceIn `json:"references,omitempty"` // Schema references Schema string `json:"schema"` - SchemaType SchemaType `json:"schemaType,omitempty"` + SchemaType SchemaType `json:"schemaType,omitempty"` // Schema type } + +// serviceSchemaRegistryAclAddOut ServiceSchemaRegistryAclAddResponse type serviceSchemaRegistryAclAddOut struct { - Acl []AclOut `json:"acl"` + Acl []AclOut `json:"acl"` // List of Schema Registry ACL entries } + +// serviceSchemaRegistryAclDeleteOut ServiceSchemaRegistryAclDeleteResponse type serviceSchemaRegistryAclDeleteOut struct { - Acl []AclOut `json:"acl"` + Acl []AclOut `json:"acl"` // List of Schema Registry ACL entries } + +// serviceSchemaRegistryAclListOut ServiceSchemaRegistryAclListResponse type serviceSchemaRegistryAclListOut struct { - Acl []AclOut `json:"acl"` + Acl []AclOut `json:"acl"` // List of Schema Registry ACL entries } + +// serviceSchemaRegistryCompatibilityOut ServiceSchemaRegistryCompatibilityResponse type serviceSchemaRegistryCompatibilityOut struct { - IsCompatible bool `json:"is_compatible"` + IsCompatible bool `json:"is_compatible"` // Compatibility } + +// serviceSchemaRegistryGlobalConfigGetOut ServiceSchemaRegistryGlobalConfigGetResponse type serviceSchemaRegistryGlobalConfigGetOut struct { - CompatibilityLevel CompatibilityType `json:"compatibilityLevel"` + CompatibilityLevel CompatibilityType `json:"compatibilityLevel"` // Configuration } + +// serviceSchemaRegistryGlobalConfigPutOut ServiceSchemaRegistryGlobalConfigPutResponse type serviceSchemaRegistryGlobalConfigPutOut struct { - Compatibility CompatibilityType `json:"compatibility"` + Compatibility CompatibilityType `json:"compatibility"` // Configuration } + +// serviceSchemaRegistrySubjectConfigGetOut ServiceSchemaRegistrySubjectConfigGetResponse type serviceSchemaRegistrySubjectConfigGetOut struct { - CompatibilityLevel CompatibilityType `json:"compatibilityLevel"` + CompatibilityLevel CompatibilityType `json:"compatibilityLevel"` // Configuration } + +// serviceSchemaRegistrySubjectConfigPutOut ServiceSchemaRegistrySubjectConfigPutResponse type serviceSchemaRegistrySubjectConfigPutOut struct { - Compatibility CompatibilityType `json:"compatibility"` + Compatibility CompatibilityType `json:"compatibility"` // Configuration } + +// serviceSchemaRegistrySubjectVersionPostOut ServiceSchemaRegistrySubjectVersionPostResponse type serviceSchemaRegistrySubjectVersionPostOut struct { - Id int `json:"id"` + Id int `json:"id"` // Version } + +// serviceSchemaRegistrySubjectVersionsGetOut ServiceSchemaRegistrySubjectVersionsGetResponse type serviceSchemaRegistrySubjectVersionsGetOut struct { - Versions []int `json:"versions"` + Versions []int `json:"versions"` // List of available versions for a Schema Registry subject } + +// serviceSchemaRegistrySubjectsOut ServiceSchemaRegistrySubjectsResponse type serviceSchemaRegistrySubjectsOut struct { - Subjects []string `json:"subjects"` + Subjects []string `json:"subjects"` // List of available Schema Registry subjects } diff --git a/handler/kafkatopic/kafkatopic.go b/handler/kafkatopic/kafkatopic.go index a83cc7f..744d96d 100644 --- a/handler/kafkatopic/kafkatopic.go +++ b/handler/kafkatopic/kafkatopic.go @@ -126,10 +126,11 @@ func (h *KafkaTopicHandler) ServiceKafkaTopicUpdate(ctx context.Context, project return err } +// CleanupPolicyOut cleanup.policy value, source and synonyms type CleanupPolicyOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *string `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *string `json:"value,omitempty"` // cleanup.policy } type CleanupPolicyType string @@ -158,10 +159,11 @@ func CompressionTypeChoices() []string { return []string{"snappy", "gzip", "lz4", "producer", "uncompressed", "zstd"} } +// CompressionTypeOut compression.type value, source and synonyms type CompressionTypeOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value CompressionTypeValue `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value CompressionTypeValue `json:"value,omitempty"` // compression.type } type CompressionTypeValue string @@ -178,87 +180,98 @@ func CompressionTypeValueChoices() []string { return []string{"snappy", "gzip", "lz4", "producer", "uncompressed", "zstd"} } +// ConfigIn Kafka topic configuration type ConfigIn struct { - CleanupPolicy CleanupPolicyType `json:"cleanup_policy,omitempty"` - CompressionType CompressionType `json:"compression_type,omitempty"` - DeleteRetentionMs *int `json:"delete_retention_ms,omitempty"` - FileDeleteDelayMs *int `json:"file_delete_delay_ms,omitempty"` - FlushMessages *int `json:"flush_messages,omitempty"` - FlushMs *int `json:"flush_ms,omitempty"` - IndexIntervalBytes *int `json:"index_interval_bytes,omitempty"` - LocalRetentionBytes *int `json:"local_retention_bytes,omitempty"` - LocalRetentionMs *int `json:"local_retention_ms,omitempty"` - MaxCompactionLagMs *int `json:"max_compaction_lag_ms,omitempty"` - MaxMessageBytes *int `json:"max_message_bytes,omitempty"` - MessageDownconversionEnable *bool `json:"message_downconversion_enable,omitempty"` - MessageFormatVersion MessageFormatVersionType `json:"message_format_version,omitempty"` - MessageTimestampDifferenceMaxMs *int `json:"message_timestamp_difference_max_ms,omitempty"` - MessageTimestampType MessageTimestampType `json:"message_timestamp_type,omitempty"` - MinCleanableDirtyRatio *float64 `json:"min_cleanable_dirty_ratio,omitempty"` - MinCompactionLagMs *int `json:"min_compaction_lag_ms,omitempty"` - MinInsyncReplicas *int `json:"min_insync_replicas,omitempty"` - Preallocate *bool `json:"preallocate,omitempty"` - RemoteStorageEnable *bool `json:"remote_storage_enable,omitempty"` - RetentionBytes *int `json:"retention_bytes,omitempty"` - RetentionMs *int `json:"retention_ms,omitempty"` - SegmentBytes *int `json:"segment_bytes,omitempty"` - SegmentIndexBytes *int `json:"segment_index_bytes,omitempty"` - SegmentJitterMs *int `json:"segment_jitter_ms,omitempty"` - SegmentMs *int `json:"segment_ms,omitempty"` - UncleanLeaderElectionEnable *bool `json:"unclean_leader_election_enable,omitempty"` -} + CleanupPolicy CleanupPolicyType `json:"cleanup_policy,omitempty"` // cleanup.policy + CompressionType CompressionType `json:"compression_type,omitempty"` // compression.type + DeleteRetentionMs *int `json:"delete_retention_ms,omitempty"` // delete.retention.ms + FileDeleteDelayMs *int `json:"file_delete_delay_ms,omitempty"` // file.delete.delay.ms + FlushMessages *int `json:"flush_messages,omitempty"` // flush.messages + FlushMs *int `json:"flush_ms,omitempty"` // flush.ms + IndexIntervalBytes *int `json:"index_interval_bytes,omitempty"` // index.interval.bytes + LocalRetentionBytes *int `json:"local_retention_bytes,omitempty"` // local.retention.bytes + LocalRetentionMs *int `json:"local_retention_ms,omitempty"` // local.retention.ms + MaxCompactionLagMs *int `json:"max_compaction_lag_ms,omitempty"` // max.compaction.lag.ms + MaxMessageBytes *int `json:"max_message_bytes,omitempty"` // max.message.bytes + MessageDownconversionEnable *bool `json:"message_downconversion_enable,omitempty"` // message.downconversion.enable + MessageFormatVersion MessageFormatVersionType `json:"message_format_version,omitempty"` // message.format.version + MessageTimestampDifferenceMaxMs *int `json:"message_timestamp_difference_max_ms,omitempty"` // message.timestamp.difference.max.ms + MessageTimestampType MessageTimestampType `json:"message_timestamp_type,omitempty"` // message.timestamp.type + MinCleanableDirtyRatio *float64 `json:"min_cleanable_dirty_ratio,omitempty"` // min.cleanable.dirty.ratio + MinCompactionLagMs *int `json:"min_compaction_lag_ms,omitempty"` // min.compaction.lag.ms + MinInsyncReplicas *int `json:"min_insync_replicas,omitempty"` // min.insync.replicas + Preallocate *bool `json:"preallocate,omitempty"` // preallocate + RemoteStorageEnable *bool `json:"remote_storage_enable,omitempty"` // remote.storage.enable + RetentionBytes *int `json:"retention_bytes,omitempty"` // retention.bytes + RetentionMs *int `json:"retention_ms,omitempty"` // retention.ms + SegmentBytes *int `json:"segment_bytes,omitempty"` // segment.bytes + SegmentIndexBytes *int `json:"segment_index_bytes,omitempty"` // segment.index.bytes + SegmentJitterMs *int `json:"segment_jitter_ms,omitempty"` // segment.jitter.ms + SegmentMs *int `json:"segment_ms,omitempty"` // segment.ms + UncleanLeaderElectionEnable *bool `json:"unclean_leader_election_enable,omitempty"` // unclean.leader.election.enable +} + +// ConfigOut Kafka topic configuration type ConfigOut struct { - CleanupPolicy *CleanupPolicyOut `json:"cleanup_policy,omitempty"` - CompressionType *CompressionTypeOut `json:"compression_type,omitempty"` - DeleteRetentionMs *DeleteRetentionMsOut `json:"delete_retention_ms,omitempty"` - FileDeleteDelayMs *FileDeleteDelayMsOut `json:"file_delete_delay_ms,omitempty"` - FlushMessages *FlushMessagesOut `json:"flush_messages,omitempty"` - FlushMs *FlushMsOut `json:"flush_ms,omitempty"` - IndexIntervalBytes *IndexIntervalBytesOut `json:"index_interval_bytes,omitempty"` - LocalRetentionBytes *LocalRetentionBytesOut `json:"local_retention_bytes,omitempty"` - LocalRetentionMs *LocalRetentionMsOut `json:"local_retention_ms,omitempty"` - MaxCompactionLagMs *MaxCompactionLagMsOut `json:"max_compaction_lag_ms,omitempty"` - MaxMessageBytes *MaxMessageBytesOut `json:"max_message_bytes,omitempty"` - MessageDownconversionEnable *MessageDownconversionEnableOut `json:"message_downconversion_enable,omitempty"` - MessageFormatVersion *MessageFormatVersionOut `json:"message_format_version,omitempty"` - MessageTimestampDifferenceMaxMs *MessageTimestampDifferenceMaxMsOut `json:"message_timestamp_difference_max_ms,omitempty"` - MessageTimestampType *MessageTimestampTypeOut `json:"message_timestamp_type,omitempty"` - MinCleanableDirtyRatio *MinCleanableDirtyRatioOut `json:"min_cleanable_dirty_ratio,omitempty"` - MinCompactionLagMs *MinCompactionLagMsOut `json:"min_compaction_lag_ms,omitempty"` - MinInsyncReplicas *MinInsyncReplicasOut `json:"min_insync_replicas,omitempty"` - Preallocate *PreallocateOut `json:"preallocate,omitempty"` - RemoteStorageEnable *RemoteStorageEnableOut `json:"remote_storage_enable,omitempty"` - RetentionBytes *RetentionBytesOut `json:"retention_bytes,omitempty"` - RetentionMs *RetentionMsOut `json:"retention_ms,omitempty"` - SegmentBytes *SegmentBytesOut `json:"segment_bytes,omitempty"` - SegmentIndexBytes *SegmentIndexBytesOut `json:"segment_index_bytes,omitempty"` - SegmentJitterMs *SegmentJitterMsOut `json:"segment_jitter_ms,omitempty"` - SegmentMs *SegmentMsOut `json:"segment_ms,omitempty"` - UncleanLeaderElectionEnable *UncleanLeaderElectionEnableOut `json:"unclean_leader_election_enable,omitempty"` + CleanupPolicy *CleanupPolicyOut `json:"cleanup_policy,omitempty"` // cleanup.policy value, source and synonyms + CompressionType *CompressionTypeOut `json:"compression_type,omitempty"` // compression.type value, source and synonyms + DeleteRetentionMs *DeleteRetentionMsOut `json:"delete_retention_ms,omitempty"` // delete.retention.ms value, source and synonyms + FileDeleteDelayMs *FileDeleteDelayMsOut `json:"file_delete_delay_ms,omitempty"` // file.delete.delay.ms value, source and synonyms + FlushMessages *FlushMessagesOut `json:"flush_messages,omitempty"` // flush.messages value, source and synonyms + FlushMs *FlushMsOut `json:"flush_ms,omitempty"` // flush.ms value, source and synonyms + IndexIntervalBytes *IndexIntervalBytesOut `json:"index_interval_bytes,omitempty"` // index.interval.bytes value, source and synonyms + LocalRetentionBytes *LocalRetentionBytesOut `json:"local_retention_bytes,omitempty"` // local.retention.bytes value, source and synonyms + LocalRetentionMs *LocalRetentionMsOut `json:"local_retention_ms,omitempty"` // local.retention.ms value, source and synonyms + MaxCompactionLagMs *MaxCompactionLagMsOut `json:"max_compaction_lag_ms,omitempty"` // max.compaction.lag.ms value, source and synonyms + MaxMessageBytes *MaxMessageBytesOut `json:"max_message_bytes,omitempty"` // max.message.bytes value, source and synonyms + MessageDownconversionEnable *MessageDownconversionEnableOut `json:"message_downconversion_enable,omitempty"` // message.downconversion.enable value, source and synonyms + MessageFormatVersion *MessageFormatVersionOut `json:"message_format_version,omitempty"` // message.format.version value, source and synonyms + MessageTimestampDifferenceMaxMs *MessageTimestampDifferenceMaxMsOut `json:"message_timestamp_difference_max_ms,omitempty"` // message.timestamp.difference.max.ms value, source and synonyms + MessageTimestampType *MessageTimestampTypeOut `json:"message_timestamp_type,omitempty"` // message.timestamp.type value, source and synonyms + MinCleanableDirtyRatio *MinCleanableDirtyRatioOut `json:"min_cleanable_dirty_ratio,omitempty"` // min.cleanable.dirty.ratio value, source and synonyms + MinCompactionLagMs *MinCompactionLagMsOut `json:"min_compaction_lag_ms,omitempty"` // min.compaction.lag.ms value, source and synonyms + MinInsyncReplicas *MinInsyncReplicasOut `json:"min_insync_replicas,omitempty"` // min.insync.replicas value, source and synonyms + Preallocate *PreallocateOut `json:"preallocate,omitempty"` // preallocate value, source and synonyms + RemoteStorageEnable *RemoteStorageEnableOut `json:"remote_storage_enable,omitempty"` // remote.storage.enable value, source and synonyms + RetentionBytes *RetentionBytesOut `json:"retention_bytes,omitempty"` // retention.bytes value, source and synonyms + RetentionMs *RetentionMsOut `json:"retention_ms,omitempty"` // retention.ms value, source and synonyms + SegmentBytes *SegmentBytesOut `json:"segment_bytes,omitempty"` // segment.bytes value, source and synonyms + SegmentIndexBytes *SegmentIndexBytesOut `json:"segment_index_bytes,omitempty"` // segment.index.bytes value, source and synonyms + SegmentJitterMs *SegmentJitterMsOut `json:"segment_jitter_ms,omitempty"` // segment.jitter.ms value, source and synonyms + SegmentMs *SegmentMsOut `json:"segment_ms,omitempty"` // segment.ms value, source and synonyms + UncleanLeaderElectionEnable *UncleanLeaderElectionEnableOut `json:"unclean_leader_election_enable,omitempty"` // unclean.leader.election.enable value, source and synonyms } type ConsumerGroupOut struct { - GroupName string `json:"group_name"` - Offset int `json:"offset"` + GroupName string `json:"group_name"` // consumer group + Offset int `json:"offset"` // Latest partition message offset } + +// DeleteRetentionMsOut delete.retention.ms value, source and synonyms type DeleteRetentionMsOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // delete.retention.ms } + +// FileDeleteDelayMsOut file.delete.delay.ms value, source and synonyms type FileDeleteDelayMsOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // file.delete.delay.ms } + +// FlushMessagesOut flush.messages value, source and synonyms type FlushMessagesOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // flush.messages } + +// FlushMsOut flush.ms value, source and synonyms type FlushMsOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // flush.ms } type FormatType string @@ -274,40 +287,53 @@ func FormatTypeChoices() []string { return []string{"binary", "json", "avro", "protobuf", "jsonschema"} } +// IndexIntervalBytesOut index.interval.bytes value, source and synonyms type IndexIntervalBytesOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // index.interval.bytes } + +// LocalRetentionBytesOut local.retention.bytes value, source and synonyms type LocalRetentionBytesOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // local.retention.ms } + +// LocalRetentionMsOut local.retention.ms value, source and synonyms type LocalRetentionMsOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // local.retention.bytes } + +// MaxCompactionLagMsOut max.compaction.lag.ms value, source and synonyms type MaxCompactionLagMsOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // max.compaction.lag.ms } + +// MaxMessageBytesOut max.message.bytes value, source and synonyms type MaxMessageBytesOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // max.message.bytes } + +// MessageDownconversionEnableOut message.downconversion.enable value, source and synonyms type MessageDownconversionEnableOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *bool `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *bool `json:"value,omitempty"` // message.downconversion.enable } + +// MessageFormatVersionOut message.format.version value, source and synonyms type MessageFormatVersionOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value MessageFormatVersionType `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value MessageFormatVersionType `json:"value,omitempty"` // message.format.version } type MessageFormatVersionType string @@ -395,16 +421,18 @@ func MessageFormatVersionTypeChoices() []string { } type MessageOut struct { - Key map[string]any `json:"key,omitempty"` - Offset *int `json:"offset,omitempty"` - Partition *int `json:"partition,omitempty"` - Topic *string `json:"topic,omitempty"` - Value map[string]any `json:"value,omitempty"` + Key map[string]any `json:"key,omitempty"` // The message key, formatted according to the embedded format + Offset *int `json:"offset,omitempty"` // Offset of the message + Partition *int `json:"partition,omitempty"` // Partition of the message + Topic *string `json:"topic,omitempty"` // The name of the topic + Value map[string]any `json:"value,omitempty"` // The message value, formatted according to the embedded format } + +// MessageTimestampDifferenceMaxMsOut message.timestamp.difference.max.ms value, source and synonyms type MessageTimestampDifferenceMaxMsOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // message.timestamp.difference.max.ms } type MessageTimestampType string @@ -417,10 +445,11 @@ func MessageTimestampTypeChoices() []string { return []string{"CreateTime", "LogAppendTime"} } +// MessageTimestampTypeOut message.timestamp.type value, source and synonyms type MessageTimestampTypeOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value MessageTimestampTypeValue `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value MessageTimestampTypeValue `json:"value,omitempty"` // message.timestamp.type } type MessageTimestampTypeValue string @@ -433,131 +462,164 @@ func MessageTimestampTypeValueChoices() []string { return []string{"CreateTime", "LogAppendTime"} } +// MinCleanableDirtyRatioOut min.cleanable.dirty.ratio value, source and synonyms type MinCleanableDirtyRatioOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *float64 `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *float64 `json:"value,omitempty"` // min.cleanable.dirty.ratio } + +// MinCompactionLagMsOut min.compaction.lag.ms value, source and synonyms type MinCompactionLagMsOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // min.compaction.lag.ms } + +// MinInsyncReplicasOut min.insync.replicas value, source and synonyms type MinInsyncReplicasOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // min.insync.replicas } type OffsetOut struct { - Error *string `json:"error,omitempty"` - ErrorCode *int `json:"error_code,omitempty"` - Offset *int `json:"offset,omitempty"` - Partition *int `json:"partition,omitempty"` + Error *string `json:"error,omitempty"` // An error message describing why the operation failed, or null if it succeeded + ErrorCode *int `json:"error_code,omitempty"` // An error code classifying the reason this operation failed, or null if it succeeded. 1 = Non-retriable Kafka exception, 2 = Retriable Kafka exception; the message might be sent successfully if retried + Offset *int `json:"offset,omitempty"` // Offset of the message, or null if publishing the message failed + Partition *int `json:"partition,omitempty"` // Partition the message was published to, or null if publishing the message failed } type PartitionOut struct { - ConsumerGroups []ConsumerGroupOut `json:"consumer_groups"` - EarliestOffset int `json:"earliest_offset"` - Isr int `json:"isr"` - LatestOffset int `json:"latest_offset"` - Partition int `json:"partition"` - RemoteSize *int `json:"remote_size,omitempty"` - Size int `json:"size"` + ConsumerGroups []ConsumerGroupOut `json:"consumer_groups"` // List of Kafka consumer groups + EarliestOffset int `json:"earliest_offset"` // Earliest partition message offset + Isr int `json:"isr"` // Number of In Sync Replicas (ISR) + LatestOffset int `json:"latest_offset"` // Latest partition message offset + Partition int `json:"partition"` // Partition number + RemoteSize *int `json:"remote_size,omitempty"` // Size of tiered data from partition in bytes + Size int `json:"size"` // Size of partition in bytes } + +// PreallocateOut preallocate value, source and synonyms type PreallocateOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *bool `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *bool `json:"value,omitempty"` // preallocate } type RecordIn struct { - Key *map[string]any `json:"key,omitempty"` - Partition *int `json:"partition,omitempty"` - Value *map[string]any `json:"value,omitempty"` + Key *map[string]any `json:"key,omitempty"` // Key for the produced record + Partition *int `json:"partition,omitempty"` // Optionally specify the partition where to produce the record + Value *map[string]any `json:"value,omitempty"` // Value for the produced record } + +// RemoteStorageEnableOut remote.storage.enable value, source and synonyms type RemoteStorageEnableOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *bool `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *bool `json:"value,omitempty"` // remote.storage.enable } + +// RetentionBytesOut retention.bytes value, source and synonyms type RetentionBytesOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // retention.bytes } + +// RetentionMsOut retention.ms value, source and synonyms type RetentionMsOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // retention.ms } + +// SegmentBytesOut segment.bytes value, source and synonyms type SegmentBytesOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // segment.bytes } + +// SegmentIndexBytesOut segment.index.bytes value, source and synonyms type SegmentIndexBytesOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // segment.index.bytes } + +// SegmentJitterMsOut segment.jitter.ms value, source and synonyms type SegmentJitterMsOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // segment.jitter.ms } + +// SegmentMsOut segment.ms value, source and synonyms type SegmentMsOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *int `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *int `json:"value,omitempty"` // segment.ms } + +// ServiceKafkaTopicCreateIn ServiceKafkaTopicCreateRequestBody type ServiceKafkaTopicCreateIn struct { - CleanupPolicy CleanupPolicyType `json:"cleanup_policy,omitempty"` - Config *ConfigIn `json:"config,omitempty"` - MinInsyncReplicas *int `json:"min_insync_replicas,omitempty"` - Partitions *int `json:"partitions,omitempty"` - Replication *int `json:"replication,omitempty"` - RetentionBytes *int `json:"retention_bytes,omitempty"` - RetentionHours *int `json:"retention_hours,omitempty"` - Tags *[]TagIn `json:"tags,omitempty"` - TopicName string `json:"topic_name"` -} + CleanupPolicy CleanupPolicyType `json:"cleanup_policy,omitempty"` // DEPRECATED: use config.cleanup_policy + Config *ConfigIn `json:"config,omitempty"` // Kafka topic configuration + MinInsyncReplicas *int `json:"min_insync_replicas,omitempty"` // DEPRECATED: use config.min_insync_replicas + Partitions *int `json:"partitions,omitempty"` // Number of partitions + Replication *int `json:"replication,omitempty"` // Number of replicas + RetentionBytes *int `json:"retention_bytes,omitempty"` // DEPRECATED: use config.retention_bytes + RetentionHours *int `json:"retention_hours,omitempty"` // DEPRECATED: use config.retention_ms + Tags *[]TagIn `json:"tags,omitempty"` // Topic tags + TopicName string `json:"topic_name"` // Topic name +} + +// ServiceKafkaTopicGetOut Kafka topic information type ServiceKafkaTopicGetOut struct { - CleanupPolicy string `json:"cleanup_policy"` - Config ConfigOut `json:"config"` - MinInsyncReplicas int `json:"min_insync_replicas"` - Partitions []PartitionOut `json:"partitions"` - Replication int `json:"replication"` - RetentionBytes int `json:"retention_bytes"` - RetentionHours int `json:"retention_hours"` - State TopicStateType `json:"state"` - Tags []TagOut `json:"tags"` - TopicName string `json:"topic_name"` -} + CleanupPolicy string `json:"cleanup_policy"` // DEPRECATED: use config.cleanup_policy + Config ConfigOut `json:"config"` // Kafka topic configuration + MinInsyncReplicas int `json:"min_insync_replicas"` // DEPRECATED: use config.min_insync_replicas + Partitions []PartitionOut `json:"partitions"` // Topic partitions + Replication int `json:"replication"` // Number of replicas + RetentionBytes int `json:"retention_bytes"` // DEPRECATED: use config.retention_bytes + RetentionHours int `json:"retention_hours"` // DEPRECATED: use config.retention_ms + State TopicStateType `json:"state"` // Topic state + Tags []TagOut `json:"tags"` // Topic tags + TopicName string `json:"topic_name"` // Topic name +} + +// ServiceKafkaTopicMessageListIn ServiceKafkaTopicMessageListRequestBody type ServiceKafkaTopicMessageListIn struct { - Format FormatType `json:"format,omitempty"` - MaxBytes *int `json:"max_bytes,omitempty"` - Partitions map[string]any `json:"partitions"` - Timeout *int `json:"timeout,omitempty"` + Format FormatType `json:"format,omitempty"` // The format of consumed messages, which is used to convert messages into a JSON-compatible form. If unspecified, defaults to binary + MaxBytes *int `json:"max_bytes,omitempty"` // The maximum number of bytes of unencoded keys and values that should be included in the response. This provides approximate control over the size of responses and the amount of memory required to store the decoded response. The actual limit will be the minimum of this setting and the server-side configuration consumer.request.max.bytes. Default is unlimited + Partitions map[string]any `json:"partitions"` // Object of desired partition / offset mappings + Timeout *int `json:"timeout,omitempty"` // The maximum total time to wait for messages for a request if the maximum request size has not yet been reached } + +// ServiceKafkaTopicMessageProduceIn ServiceKafkaTopicMessageProduceRequestBody type ServiceKafkaTopicMessageProduceIn struct { - Format FormatType `json:"format"` - KeySchema *string `json:"key_schema,omitempty"` - KeySchemaId *int `json:"key_schema_id,omitempty"` - Records []RecordIn `json:"records"` - ValueSchema *string `json:"value_schema,omitempty"` - ValueSchemaId *int `json:"value_schema_id,omitempty"` + Format FormatType `json:"format"` // The format of the content. + KeySchema *string `json:"key_schema,omitempty"` // Full schema encoded as a string (e.g. JSON serialized for Avro data) + KeySchemaId *int `json:"key_schema_id,omitempty"` // ID returned by a previous request using the same schema. This ID corresponds to the ID of the schema in the registry. + Records []RecordIn `json:"records"` // List of records to produce to the topic + ValueSchema *string `json:"value_schema,omitempty"` // Full schema encoded as a string (e.g. JSON serialized for Avro data) + ValueSchemaId *int `json:"value_schema_id,omitempty"` // ID returned by a previous request using the same schema. This ID corresponds to the ID of the schema in the registry. } + +// ServiceKafkaTopicMessageProduceOut ServiceKafkaTopicMessageProduceResponse type ServiceKafkaTopicMessageProduceOut struct { - KeySchemaId *int `json:"key_schema_id,omitempty"` - Offsets []OffsetOut `json:"offsets,omitempty"` - ValueSchemaId *int `json:"value_schema_id,omitempty"` + KeySchemaId *int `json:"key_schema_id,omitempty"` // The ID for the schema used to produce keys, or null if keys were not used + Offsets []OffsetOut `json:"offsets,omitempty"` // List of offsets for the produced record + ValueSchemaId *int `json:"value_schema_id,omitempty"` // The ID for the schema used to produce values } + +// ServiceKafkaTopicUpdateIn ServiceKafkaTopicUpdateRequestBody type ServiceKafkaTopicUpdateIn struct { - Config *ConfigIn `json:"config,omitempty"` - MinInsyncReplicas *int `json:"min_insync_replicas,omitempty"` - Partitions *int `json:"partitions,omitempty"` - Replication *int `json:"replication,omitempty"` - RetentionBytes *int `json:"retention_bytes,omitempty"` - RetentionHours *int `json:"retention_hours,omitempty"` - Tags *[]TagIn `json:"tags,omitempty"` + Config *ConfigIn `json:"config,omitempty"` // Kafka topic configuration + MinInsyncReplicas *int `json:"min_insync_replicas,omitempty"` // DEPRECATED: use config.min_insync_replicas + Partitions *int `json:"partitions,omitempty"` // Number of partitions + Replication *int `json:"replication,omitempty"` // Number of replicas + RetentionBytes *int `json:"retention_bytes,omitempty"` // DEPRECATED: use config.retention_bytes + RetentionHours *int `json:"retention_hours,omitempty"` // DEPRECATED: use config.retention_ms + Tags *[]TagIn `json:"tags,omitempty"` // Topic tags } type SourceType string @@ -576,29 +638,29 @@ func SourceTypeChoices() []string { } type SynonymOut struct { - Name *string `json:"name,omitempty"` - Source SourceType `json:"source,omitempty"` - Value *bool `json:"value,omitempty"` + Name *string `json:"name,omitempty"` // Synonym name + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Value *bool `json:"value,omitempty"` // Synonym value } type TagIn struct { - Key string `json:"key"` - Value string `json:"value"` + Key string `json:"key"` // Tag key + Value string `json:"value"` // Tag value } type TagOut struct { - Key string `json:"key"` - Value string `json:"value"` + Key string `json:"key"` // Tag key + Value string `json:"value"` // Tag value } type TopicOut struct { - CleanupPolicy string `json:"cleanup_policy"` - MinInsyncReplicas int `json:"min_insync_replicas"` - Partitions int `json:"partitions"` - RemoteStorageEnable *bool `json:"remote_storage_enable,omitempty"` - Replication int `json:"replication"` - RetentionBytes int `json:"retention_bytes"` - RetentionHours int `json:"retention_hours"` - State TopicStateType `json:"state"` - Tags []TagOut `json:"tags"` - TopicName string `json:"topic_name"` + CleanupPolicy string `json:"cleanup_policy"` // cleanup.policy + MinInsyncReplicas int `json:"min_insync_replicas"` // min.insync.replicas + Partitions int `json:"partitions"` // Number of partitions + RemoteStorageEnable *bool `json:"remote_storage_enable,omitempty"` // remote.storage.enable + Replication int `json:"replication"` // Number of replicas + RetentionBytes int `json:"retention_bytes"` // retention.bytes + RetentionHours int `json:"retention_hours"` // Retention period (hours) + State TopicStateType `json:"state"` // Topic state + Tags []TagOut `json:"tags"` // Topic tags + TopicName string `json:"topic_name"` // Topic name } type TopicStateType string @@ -612,17 +674,24 @@ func TopicStateTypeChoices() []string { return []string{"ACTIVE", "CONFIGURING", "DELETING"} } +// UncleanLeaderElectionEnableOut unclean.leader.election.enable value, source and synonyms type UncleanLeaderElectionEnableOut struct { - Source SourceType `json:"source,omitempty"` - Synonyms []SynonymOut `json:"synonyms,omitempty"` - Value *bool `json:"value,omitempty"` + Source SourceType `json:"source,omitempty"` // Source of the Kafka topic configuration entry + Synonyms []SynonymOut `json:"synonyms,omitempty"` // Configuration synonyms + Value *bool `json:"value,omitempty"` // unclean.leader.election.enable } + +// serviceKafkaTopicGetOut ServiceKafkaTopicGetResponse type serviceKafkaTopicGetOut struct { - Topic ServiceKafkaTopicGetOut `json:"topic"` + Topic ServiceKafkaTopicGetOut `json:"topic"` // Kafka topic information } + +// serviceKafkaTopicListOut ServiceKafkaTopicListResponse type serviceKafkaTopicListOut struct { - Topics []TopicOut `json:"topics"` + Topics []TopicOut `json:"topics"` // List of Kafka topics } + +// serviceKafkaTopicMessageListOut ServiceKafkaTopicMessageListResponse type serviceKafkaTopicMessageListOut struct { - Messages []MessageOut `json:"messages,omitempty"` + Messages []MessageOut `json:"messages,omitempty"` // List of messages from topic } diff --git a/handler/mysql/mysql.go b/handler/mysql/mysql.go index 2b0e09b..073c941 100644 --- a/handler/mysql/mysql.go +++ b/handler/mysql/mysql.go @@ -42,48 +42,51 @@ func (h *MySQLHandler) MySQLServiceQueryStatistics(ctx context.Context, project return out.Queries, nil } +// MySqlserviceQueryStatisticsIn MySQLServiceQueryStatisticsRequestBody type MySqlserviceQueryStatisticsIn struct { - Limit *int `json:"limit,omitempty"` - Offset *int `json:"offset,omitempty"` - OrderBy *string `json:"order_by,omitempty"` + Limit *int `json:"limit,omitempty"` // Limit for number of results + Offset *int `json:"offset,omitempty"` // Offset for retrieved results based on sort order + OrderBy *string `json:"order_by,omitempty"` // Order in which to sort retrieved results } type QueryOut struct { - AvgTimerWait *float64 `json:"avg_timer_wait,omitempty"` - CountStar *float64 `json:"count_star,omitempty"` - Digest *string `json:"digest,omitempty"` - DigestText *string `json:"digest_text,omitempty"` - FirstSeen *string `json:"first_seen,omitempty"` - LastSeen *string `json:"last_seen,omitempty"` - MaxTimerWait *float64 `json:"max_timer_wait,omitempty"` - MinTimerWait *float64 `json:"min_timer_wait,omitempty"` - Quantile95 *float64 `json:"quantile_95,omitempty"` - Quantile99 *float64 `json:"quantile_99,omitempty"` - Quantile999 *float64 `json:"quantile_999,omitempty"` - QuerySampleSeen *string `json:"query_sample_seen,omitempty"` - QuerySampleText *string `json:"query_sample_text,omitempty"` - QuerySampleTimerWait *string `json:"query_sample_timer_wait,omitempty"` - SchemaName *string `json:"schema_name,omitempty"` - SumCreatedTmpDiskTables *float64 `json:"sum_created_tmp_disk_tables,omitempty"` - SumCreatedTmpTables *float64 `json:"sum_created_tmp_tables,omitempty"` - SumErrors *float64 `json:"sum_errors,omitempty"` - SumLockTime *float64 `json:"sum_lock_time,omitempty"` - SumNoGoodIndexUsed *float64 `json:"sum_no_good_index_used,omitempty"` - SumNoIndexUsed *float64 `json:"sum_no_index_used,omitempty"` - SumRowsAffected *float64 `json:"sum_rows_affected,omitempty"` - SumRowsExamined *float64 `json:"sum_rows_examined,omitempty"` - SumRowsSent *float64 `json:"sum_rows_sent,omitempty"` - SumSelectFullJoin *float64 `json:"sum_select_full_join,omitempty"` - SumSelectFullRangeJoin *float64 `json:"sum_select_full_range_join,omitempty"` - SumSelectRange *float64 `json:"sum_select_range,omitempty"` - SumSelectRangeCheck *float64 `json:"sum_select_range_check,omitempty"` - SumSelectScan *float64 `json:"sum_select_scan,omitempty"` - SumSortMergePasses *float64 `json:"sum_sort_merge_passes,omitempty"` - SumSortRange *float64 `json:"sum_sort_range,omitempty"` - SumSortRows *float64 `json:"sum_sort_rows,omitempty"` - SumSortScan *float64 `json:"sum_sort_scan,omitempty"` - SumTimerWait *float64 `json:"sum_timer_wait,omitempty"` - SumWarnings *float64 `json:"sum_warnings,omitempty"` + AvgTimerWait *float64 `json:"avg_timer_wait,omitempty"` // Query statistic + CountStar *float64 `json:"count_star,omitempty"` // Query statistic + Digest *string `json:"digest,omitempty"` // Query statistic + DigestText *string `json:"digest_text,omitempty"` // Query statistic + FirstSeen *string `json:"first_seen,omitempty"` // Query statistic + LastSeen *string `json:"last_seen,omitempty"` // Query statistic + MaxTimerWait *float64 `json:"max_timer_wait,omitempty"` // Query statistic + MinTimerWait *float64 `json:"min_timer_wait,omitempty"` // Query statistic + Quantile95 *float64 `json:"quantile_95,omitempty"` // Query statistic + Quantile99 *float64 `json:"quantile_99,omitempty"` // Query statistic + Quantile999 *float64 `json:"quantile_999,omitempty"` // Query statistic + QuerySampleSeen *string `json:"query_sample_seen,omitempty"` // Query statistic + QuerySampleText *string `json:"query_sample_text,omitempty"` // Query statistic + QuerySampleTimerWait *string `json:"query_sample_timer_wait,omitempty"` // Query statistic + SchemaName *string `json:"schema_name,omitempty"` // Query statistic + SumCreatedTmpDiskTables *float64 `json:"sum_created_tmp_disk_tables,omitempty"` // Query statistic + SumCreatedTmpTables *float64 `json:"sum_created_tmp_tables,omitempty"` // Query statistic + SumErrors *float64 `json:"sum_errors,omitempty"` // Query statistic + SumLockTime *float64 `json:"sum_lock_time,omitempty"` // Query statistic + SumNoGoodIndexUsed *float64 `json:"sum_no_good_index_used,omitempty"` // Query statistic + SumNoIndexUsed *float64 `json:"sum_no_index_used,omitempty"` // Query statistic + SumRowsAffected *float64 `json:"sum_rows_affected,omitempty"` // Query statistic + SumRowsExamined *float64 `json:"sum_rows_examined,omitempty"` // Query statistic + SumRowsSent *float64 `json:"sum_rows_sent,omitempty"` // Query statistic + SumSelectFullJoin *float64 `json:"sum_select_full_join,omitempty"` // Query statistic + SumSelectFullRangeJoin *float64 `json:"sum_select_full_range_join,omitempty"` // Query statistic + SumSelectRange *float64 `json:"sum_select_range,omitempty"` // Query statistic + SumSelectRangeCheck *float64 `json:"sum_select_range_check,omitempty"` // Query statistic + SumSelectScan *float64 `json:"sum_select_scan,omitempty"` // Query statistic + SumSortMergePasses *float64 `json:"sum_sort_merge_passes,omitempty"` // Query statistic + SumSortRange *float64 `json:"sum_sort_range,omitempty"` // Query statistic + SumSortRows *float64 `json:"sum_sort_rows,omitempty"` // Query statistic + SumSortScan *float64 `json:"sum_sort_scan,omitempty"` // Query statistic + SumTimerWait *float64 `json:"sum_timer_wait,omitempty"` // Query statistic + SumWarnings *float64 `json:"sum_warnings,omitempty"` // Query statistic } + +// mySqlserviceQueryStatisticsOut MySQLServiceQueryStatisticsResponse type mySqlserviceQueryStatisticsOut struct { - Queries []QueryOut `json:"queries"` + Queries []QueryOut `json:"queries"` // List of query statistics } diff --git a/handler/opensearch/opensearch.go b/handler/opensearch/opensearch.go index bfd7e61..e6fdef0 100644 --- a/handler/opensearch/opensearch.go +++ b/handler/opensearch/opensearch.go @@ -162,11 +162,11 @@ func (h *OpenSearchHandler) ServiceOpenSearchSecuritySet(ctx context.Context, pr } type AclIn struct { - Rules []RuleIn `json:"rules"` + Rules []RuleIn `json:"rules"` // OpenSearch rules Username string `json:"username"` } type AclOut struct { - Rules []RuleOut `json:"rules"` + Rules []RuleOut `json:"rules"` // OpenSearch rules Username string `json:"username"` } type HealthType string @@ -184,16 +184,16 @@ func HealthTypeChoices() []string { } type IndexeOut struct { - CreateTime time.Time `json:"create_time"` - Docs *int `json:"docs,omitempty"` - Health HealthType `json:"health,omitempty"` - IndexName string `json:"index_name"` - NumberOfReplicas int `json:"number_of_replicas"` - NumberOfShards int `json:"number_of_shards"` - ReadOnlyAllowDelete *bool `json:"read_only_allow_delete,omitempty"` - Replication *ReplicationOut `json:"replication,omitempty"` - Size *int `json:"size,omitempty"` - Status IndexeStatusType `json:"status,omitempty"` + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + Docs *int `json:"docs,omitempty"` // Number of documents in index. -1 means not available. + Health HealthType `json:"health,omitempty"` // Index health + IndexName string `json:"index_name"` // Index name + NumberOfReplicas int `json:"number_of_replicas"` // Number of replicas for an index + NumberOfShards int `json:"number_of_shards"` // Number of shards in an index + ReadOnlyAllowDelete *bool `json:"read_only_allow_delete,omitempty"` // Whether an index is set as read-only (but allows deletion). null means unknown. + Replication *ReplicationOut `json:"replication,omitempty"` // Index replication + Size *int `json:"size,omitempty"` // Index size in bytes. -1 means not available. + Status IndexeStatusType `json:"status,omitempty"` // Index status } type IndexeStatusType string @@ -208,13 +208,16 @@ func IndexeStatusTypeChoices() []string { return []string{"unknown", "open", "close", "none"} } +// OpensearchAclConfigIn OpenSearch ACL configuration type OpensearchAclConfigIn struct { - Acls []AclIn `json:"acls"` - Enabled bool `json:"enabled"` + Acls []AclIn `json:"acls"` // List of OpenSearch ACLs + Enabled bool `json:"enabled"` // Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access. } + +// OpensearchAclConfigInAlt OpenSearch ACL configuration type OpensearchAclConfigInAlt struct { - Acls *[]AclIn `json:"acls,omitempty"` - Enabled *bool `json:"enabled,omitempty"` + Acls *[]AclIn `json:"acls,omitempty"` // List of OpenSearch ACLs + Enabled *bool `json:"enabled,omitempty"` // Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access. } type PermissionType string @@ -230,68 +233,97 @@ func PermissionTypeChoices() []string { return []string{"deny", "admin", "read", "readwrite", "write"} } +// ReplicationOut Index replication type ReplicationOut struct { - LeaderIndex *string `json:"leader_index,omitempty"` - LeaderProject *string `json:"leader_project,omitempty"` - LeaderService *string `json:"leader_service,omitempty"` + LeaderIndex *string `json:"leader_index,omitempty"` // Leader index name + LeaderProject *string `json:"leader_project,omitempty"` // Leader project name + LeaderService *string `json:"leader_service,omitempty"` // Leader service name } type RuleIn struct { - Index string `json:"index"` - Permission PermissionType `json:"permission"` + Index string `json:"index"` // OpenSearch index pattern + Permission PermissionType `json:"permission"` // OpenSearch permission } type RuleOut struct { - Index string `json:"index"` - Permission PermissionType `json:"permission"` + Index string `json:"index"` // OpenSearch index pattern + Permission PermissionType `json:"permission"` // OpenSearch permission } + +// ServiceOpenSearchAclGetOut OpenSearch ACL configuration type ServiceOpenSearchAclGetOut struct { - Acls []AclOut `json:"acls"` - Enabled bool `json:"enabled"` + Acls []AclOut `json:"acls"` // List of OpenSearch ACLs + Enabled bool `json:"enabled"` // Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access. } + +// ServiceOpenSearchAclSetIn ServiceOpenSearchAclSetRequestBody type ServiceOpenSearchAclSetIn struct { - OpensearchAclConfig OpensearchAclConfigIn `json:"opensearch_acl_config"` + OpensearchAclConfig OpensearchAclConfigIn `json:"opensearch_acl_config"` // OpenSearch ACL configuration } + +// ServiceOpenSearchAclSetOut OpenSearch ACL configuration type ServiceOpenSearchAclSetOut struct { - Acls []AclOut `json:"acls"` - Enabled bool `json:"enabled"` + Acls []AclOut `json:"acls"` // List of OpenSearch ACLs + Enabled bool `json:"enabled"` // Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access. } + +// ServiceOpenSearchAclUpdateIn ServiceOpenSearchAclUpdateRequestBody type ServiceOpenSearchAclUpdateIn struct { - OpensearchAclConfig OpensearchAclConfigInAlt `json:"opensearch_acl_config"` + OpensearchAclConfig OpensearchAclConfigInAlt `json:"opensearch_acl_config"` // OpenSearch ACL configuration } + +// ServiceOpenSearchAclUpdateOut OpenSearch ACL configuration type ServiceOpenSearchAclUpdateOut struct { - Acls []AclOut `json:"acls"` - Enabled bool `json:"enabled"` + Acls []AclOut `json:"acls"` // List of OpenSearch ACLs + Enabled bool `json:"enabled"` // Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access. } + +// ServiceOpenSearchSecurityGetOut ServiceOpenSearchSecurityGetResponse type ServiceOpenSearchSecurityGetOut struct { - SecurityPluginAdminEnabled bool `json:"security_plugin_admin_enabled"` - SecurityPluginAvailable bool `json:"security_plugin_available"` - SecurityPluginEnabled *bool `json:"security_plugin_enabled,omitempty"` + SecurityPluginAdminEnabled bool `json:"security_plugin_admin_enabled"` // security plugin admin defined + SecurityPluginAvailable bool `json:"security_plugin_available"` // Opensearch security available for the service + SecurityPluginEnabled *bool `json:"security_plugin_enabled,omitempty"` // Opensearch security enabled for the service } + +// ServiceOpenSearchSecurityResetIn ServiceOpenSearchSecurityResetRequestBody type ServiceOpenSearchSecurityResetIn struct { - AdminPassword string `json:"admin_password"` - NewPassword string `json:"new_password"` + AdminPassword string `json:"admin_password"` // Current os-sec-admin password + NewPassword string `json:"new_password"` // New os-sec-admin password } + +// ServiceOpenSearchSecurityResetOut ServiceOpenSearchSecurityResetResponse type ServiceOpenSearchSecurityResetOut struct { - SecurityPluginAdminEnabled bool `json:"security_plugin_admin_enabled"` - SecurityPluginAvailable bool `json:"security_plugin_available"` - SecurityPluginEnabled *bool `json:"security_plugin_enabled,omitempty"` + SecurityPluginAdminEnabled bool `json:"security_plugin_admin_enabled"` // security plugin admin defined + SecurityPluginAvailable bool `json:"security_plugin_available"` // Opensearch security available for the service + SecurityPluginEnabled *bool `json:"security_plugin_enabled,omitempty"` // Opensearch security enabled for the service } + +// ServiceOpenSearchSecuritySetIn ServiceOpenSearchSecuritySetRequestBody type ServiceOpenSearchSecuritySetIn struct { - AdminPassword string `json:"admin_password"` + AdminPassword string `json:"admin_password"` // os-sec-admin password } + +// ServiceOpenSearchSecuritySetOut ServiceOpenSearchSecuritySetResponse type ServiceOpenSearchSecuritySetOut struct { - SecurityPluginAdminEnabled bool `json:"security_plugin_admin_enabled"` - SecurityPluginAvailable bool `json:"security_plugin_available"` - SecurityPluginEnabled *bool `json:"security_plugin_enabled,omitempty"` + SecurityPluginAdminEnabled bool `json:"security_plugin_admin_enabled"` // security plugin admin defined + SecurityPluginAvailable bool `json:"security_plugin_available"` // Opensearch security available for the service + SecurityPluginEnabled *bool `json:"security_plugin_enabled,omitempty"` // Opensearch security enabled for the service } + +// serviceOpenSearchAclGetOut ServiceOpenSearchAclGetResponse type serviceOpenSearchAclGetOut struct { - OpensearchAclConfig ServiceOpenSearchAclGetOut `json:"opensearch_acl_config"` + OpensearchAclConfig ServiceOpenSearchAclGetOut `json:"opensearch_acl_config"` // OpenSearch ACL configuration } + +// serviceOpenSearchAclSetOut ServiceOpenSearchAclSetResponse type serviceOpenSearchAclSetOut struct { - OpensearchAclConfig ServiceOpenSearchAclSetOut `json:"opensearch_acl_config"` + OpensearchAclConfig ServiceOpenSearchAclSetOut `json:"opensearch_acl_config"` // OpenSearch ACL configuration } + +// serviceOpenSearchAclUpdateOut ServiceOpenSearchAclUpdateResponse type serviceOpenSearchAclUpdateOut struct { - OpensearchAclConfig ServiceOpenSearchAclUpdateOut `json:"opensearch_acl_config"` + OpensearchAclConfig ServiceOpenSearchAclUpdateOut `json:"opensearch_acl_config"` // OpenSearch ACL configuration } + +// serviceOpenSearchIndexListOut ServiceOpenSearchIndexListResponse type serviceOpenSearchIndexListOut struct { - Indexes []IndexeOut `json:"indexes"` + Indexes []IndexeOut `json:"indexes"` // List of OpenSearch indexes } diff --git a/handler/organization/organization.go b/handler/organization/organization.go index 4742129..26b0bee 100644 --- a/handler/organization/organization.go +++ b/handler/organization/organization.go @@ -172,14 +172,14 @@ func (h *OrganizationHandler) UserOrganizationsList(ctx context.Context) ([]Orga } type DomainOut struct { - ChallengeToken string `json:"challenge_token"` - CreateTime time.Time `json:"create_time"` - DomainId string `json:"domain_id"` - DomainName string `json:"domain_name"` - LinkedAuthenticationMethodIds []string `json:"linked_authentication_method_ids"` - OrganizationId string `json:"organization_id"` - State DomainStateType `json:"state"` - VerificationType VerificationType `json:"verification_type"` + ChallengeToken string `json:"challenge_token"` // Random string to be used for validation + CreateTime time.Time `json:"create_time"` // Time of creating the domain + DomainId string `json:"domain_id"` // ID of the domain + DomainName string `json:"domain_name"` // Name of the domain + LinkedAuthenticationMethodIds []string `json:"linked_authentication_method_ids"` // Linked Authentication Method Ids + OrganizationId string `json:"organization_id"` // ID of the organization owning this domain + State DomainStateType `json:"state"` // State of the verification process + VerificationType VerificationType `json:"verification_type"` // Type of verification to be made } type DomainStateType string @@ -193,68 +193,81 @@ func DomainStateTypeChoices() []string { return []string{"deleted", "unverified", "verified"} } +// OrganizationAuthDomainLinkIn OrganizationAuthDomainLinkRequestBody type OrganizationAuthDomainLinkIn struct { - DomainId string `json:"domain_id"` + DomainId string `json:"domain_id"` // ID of the domain } + +// OrganizationAuthenticationConfigGetOut OrganizationAuthenticationConfigGetResponse type OrganizationAuthenticationConfigGetOut struct { - OauthEnabled *bool `json:"oauth_enabled,omitempty"` - PasswordAuthEnabled *bool `json:"password_auth_enabled,omitempty"` - PersonalTokensEnabled *bool `json:"personal_tokens_enabled,omitempty"` - PersonalTokensRequireAllowedAuthMethod *bool `json:"personal_tokens_require_allowed_auth_method,omitempty"` - SamlAllowExternal *bool `json:"saml_allow_external,omitempty"` - SamlEnabled *bool `json:"saml_enabled,omitempty"` - TwoFactorRequired *bool `json:"two_factor_required,omitempty"` + OauthEnabled *bool `json:"oauth_enabled,omitempty"` // Organization users are able to use OAuth authentication. + PasswordAuthEnabled *bool `json:"password_auth_enabled,omitempty"` // Organization users are able to use password authentication. + PersonalTokensEnabled *bool `json:"personal_tokens_enabled,omitempty"` // Organization users can use their personal tokens to access the organization through the Aiven API or other applications. + PersonalTokensRequireAllowedAuthMethod *bool `json:"personal_tokens_require_allowed_auth_method,omitempty"` // Organization users are able to use personal tokens that were generated from one of the allowed authentication methods. + SamlAllowExternal *bool `json:"saml_allow_external,omitempty"` // Organization users are able to use SAML authentication of other organizations. + SamlEnabled *bool `json:"saml_enabled,omitempty"` // Organization users are able to use SAML authentication. + TwoFactorRequired *bool `json:"two_factor_required,omitempty"` // 2FA is required to access resources in this organization. } + +// OrganizationAuthenticationConfigUpdateIn OrganizationAuthenticationConfigUpdateRequestBody type OrganizationAuthenticationConfigUpdateIn struct { - OauthEnabled *bool `json:"oauth_enabled,omitempty"` - PasswordAuthEnabled *bool `json:"password_auth_enabled,omitempty"` - PersonalTokensEnabled *bool `json:"personal_tokens_enabled,omitempty"` - PersonalTokensRequireAllowedAuthMethod *bool `json:"personal_tokens_require_allowed_auth_method,omitempty"` - SamlAllowExternal *bool `json:"saml_allow_external,omitempty"` - SamlEnabled *bool `json:"saml_enabled,omitempty"` - TwoFactorRequired *bool `json:"two_factor_required,omitempty"` + OauthEnabled *bool `json:"oauth_enabled,omitempty"` // Organization users are able to use OAuth authentication. + PasswordAuthEnabled *bool `json:"password_auth_enabled,omitempty"` // Organization users are able to use password authentication. + PersonalTokensEnabled *bool `json:"personal_tokens_enabled,omitempty"` // Organization users can use their personal tokens to access the organization through the Aiven API or other applications. + PersonalTokensRequireAllowedAuthMethod *bool `json:"personal_tokens_require_allowed_auth_method,omitempty"` // Organization users are able to use personal tokens that were generated from one of the allowed authentication methods. + SamlAllowExternal *bool `json:"saml_allow_external,omitempty"` // Organization users are able to use SAML authentication of other organizations. + SamlEnabled *bool `json:"saml_enabled,omitempty"` // Organization users are able to use SAML authentication. + TwoFactorRequired *bool `json:"two_factor_required,omitempty"` // 2FA is required to access resources in this organization. } + +// OrganizationAuthenticationConfigUpdateOut OrganizationAuthenticationConfigUpdateResponse type OrganizationAuthenticationConfigUpdateOut struct { - OauthEnabled *bool `json:"oauth_enabled,omitempty"` - PasswordAuthEnabled *bool `json:"password_auth_enabled,omitempty"` - PersonalTokensEnabled *bool `json:"personal_tokens_enabled,omitempty"` - PersonalTokensRequireAllowedAuthMethod *bool `json:"personal_tokens_require_allowed_auth_method,omitempty"` - SamlAllowExternal *bool `json:"saml_allow_external,omitempty"` - SamlEnabled *bool `json:"saml_enabled,omitempty"` - TwoFactorRequired *bool `json:"two_factor_required,omitempty"` + OauthEnabled *bool `json:"oauth_enabled,omitempty"` // Organization users are able to use OAuth authentication. + PasswordAuthEnabled *bool `json:"password_auth_enabled,omitempty"` // Organization users are able to use password authentication. + PersonalTokensEnabled *bool `json:"personal_tokens_enabled,omitempty"` // Organization users can use their personal tokens to access the organization through the Aiven API or other applications. + PersonalTokensRequireAllowedAuthMethod *bool `json:"personal_tokens_require_allowed_auth_method,omitempty"` // Organization users are able to use personal tokens that were generated from one of the allowed authentication methods. + SamlAllowExternal *bool `json:"saml_allow_external,omitempty"` // Organization users are able to use SAML authentication of other organizations. + SamlEnabled *bool `json:"saml_enabled,omitempty"` // Organization users are able to use SAML authentication. + TwoFactorRequired *bool `json:"two_factor_required,omitempty"` // 2FA is required to access resources in this organization. } + +// OrganizationGetOut OrganizationGetResponse type OrganizationGetOut struct { - AccountId string `json:"account_id"` - CreateTime time.Time `json:"create_time"` - DefaultGovernanceUserGroupId *string `json:"default_governance_user_group_id,omitempty"` - OrganizationId string `json:"organization_id"` - OrganizationName string `json:"organization_name"` - Tier TierType `json:"tier"` - UpdateTime time.Time `json:"update_time"` + AccountId string `json:"account_id"` // Account ID of the organization's root unit + CreateTime time.Time `json:"create_time"` // Time of creating the organization + DefaultGovernanceUserGroupId *string `json:"default_governance_user_group_id,omitempty"` // Default governance user group ID + OrganizationId string `json:"organization_id"` // Organization's ID + OrganizationName string `json:"organization_name"` // Organization's name + Tier TierType `json:"tier"` // Tier of the organization + UpdateTime time.Time `json:"update_time"` // Time of the organization's latest update } type OrganizationOut struct { - AccountId string `json:"account_id"` - CreateTime time.Time `json:"create_time"` - DefaultGovernanceUserGroupId *string `json:"default_governance_user_group_id,omitempty"` - OrganizationId string `json:"organization_id"` - OrganizationName string `json:"organization_name"` - Tier TierType `json:"tier"` - UpdateTime time.Time `json:"update_time"` + AccountId string `json:"account_id"` // Account ID of the organization's root unit + CreateTime time.Time `json:"create_time"` // Time of creating the organization + DefaultGovernanceUserGroupId *string `json:"default_governance_user_group_id,omitempty"` // Default governance user group ID + OrganizationId string `json:"organization_id"` // Organization's ID + OrganizationName string `json:"organization_name"` // Organization's name + Tier TierType `json:"tier"` // Tier of the organization + UpdateTime time.Time `json:"update_time"` // Time of the organization's latest update } + +// OrganizationUpdateIn OrganizationUpdateRequestBody type OrganizationUpdateIn struct { - DefaultGovernanceUserGroupId *string `json:"default_governance_user_group_id,omitempty"` - KafkaGovernanceEnabled *bool `json:"kafka_governance_enabled,omitempty"` - Name *string `json:"name,omitempty"` - Tier TierType `json:"tier,omitempty"` + DefaultGovernanceUserGroupId *string `json:"default_governance_user_group_id,omitempty"` // Default governance user group ID + KafkaGovernanceEnabled *bool `json:"kafka_governance_enabled,omitempty"` // Under development - Feature flag for Kafka governance + Name *string `json:"name,omitempty"` // New name of the organization + Tier TierType `json:"tier,omitempty"` // New tier for the organization } + +// OrganizationUpdateOut OrganizationUpdateResponse type OrganizationUpdateOut struct { - AccountId string `json:"account_id"` - CreateTime time.Time `json:"create_time"` - DefaultGovernanceUserGroupId *string `json:"default_governance_user_group_id,omitempty"` - OrganizationId string `json:"organization_id"` - OrganizationName string `json:"organization_name"` - Tier TierType `json:"tier"` - UpdateTime time.Time `json:"update_time"` + AccountId string `json:"account_id"` // Account ID of the organization's root unit + CreateTime time.Time `json:"create_time"` // Time of creating the organization + DefaultGovernanceUserGroupId *string `json:"default_governance_user_group_id,omitempty"` // Default governance user group ID + OrganizationId string `json:"organization_id"` // Organization's ID + OrganizationName string `json:"organization_name"` // Organization's name + Tier TierType `json:"tier"` // Tier of the organization + UpdateTime time.Time `json:"update_time"` // Time of the organization's latest update } type TierType string @@ -267,19 +280,22 @@ func TierTypeChoices() []string { return []string{"business", "personal"} } +// UserOrganizationCreateIn UserOrganizationCreateRequestBody type UserOrganizationCreateIn struct { - OrganizationName string `json:"organization_name"` - PrimaryBillingGroupId *string `json:"primary_billing_group_id,omitempty"` - Tier TierType `json:"tier"` + OrganizationName string `json:"organization_name"` // Organization's name + PrimaryBillingGroupId *string `json:"primary_billing_group_id,omitempty"` // Billing group ID + Tier TierType `json:"tier"` // Tier of the organization } + +// UserOrganizationCreateOut UserOrganizationCreateResponse type UserOrganizationCreateOut struct { - AccountId string `json:"account_id"` - CreateTime time.Time `json:"create_time"` - DefaultGovernanceUserGroupId *string `json:"default_governance_user_group_id,omitempty"` - OrganizationId string `json:"organization_id"` - OrganizationName string `json:"organization_name"` - Tier TierType `json:"tier"` - UpdateTime time.Time `json:"update_time"` + AccountId string `json:"account_id"` // Account ID of the organization's root unit + CreateTime time.Time `json:"create_time"` // Time of creating the organization + DefaultGovernanceUserGroupId *string `json:"default_governance_user_group_id,omitempty"` // Default governance user group ID + OrganizationId string `json:"organization_id"` // Organization's ID + OrganizationName string `json:"organization_name"` // Organization's name + Tier TierType `json:"tier"` // Tier of the organization + UpdateTime time.Time `json:"update_time"` // Time of the organization's latest update } type VerificationType string @@ -292,9 +308,12 @@ func VerificationTypeChoices() []string { return []string{"dns", "http"} } +// organizationAuthDomainListOut OrganizationAuthDomainListResponse type organizationAuthDomainListOut struct { - Domains []DomainOut `json:"domains"` + Domains []DomainOut `json:"domains"` // List of domains for the organization } + +// userOrganizationsListOut UserOrganizationsListResponse type userOrganizationsListOut struct { - Organizations []OrganizationOut `json:"organizations"` + Organizations []OrganizationOut `json:"organizations"` // Organizations } diff --git a/handler/organizationuser/organizationuser.go b/handler/organizationuser/organizationuser.go index 20701cc..7a6a7fc 100644 --- a/handler/organizationuser/organizationuser.go +++ b/handler/organizationuser/organizationuser.go @@ -204,35 +204,41 @@ func ActionTypeChoices() []string { } type AuthenticationMethodOut struct { - IsEnabled2Fa *bool `json:"is_enabled_2fa,omitempty"` - LastUsedTime *time.Time `json:"last_used_time,omitempty"` - LocalProviderId *string `json:"local_provider_id,omitempty"` - MethodId *string `json:"method_id,omitempty"` - Name *string `json:"name,omitempty"` - OrganizationId *string `json:"organization_id,omitempty"` - RemoteProviderId string `json:"remote_provider_id"` - Type *string `json:"type,omitempty"` - UserEmail *string `json:"user_email,omitempty"` - UserId *string `json:"user_id,omitempty"` + IsEnabled2Fa *bool `json:"is_enabled_2fa,omitempty"` // Verifies if 2FA is enabled for the user + LastUsedTime *time.Time `json:"last_used_time,omitempty"` // Last activity time with the authentication method + LocalProviderId *string `json:"local_provider_id,omitempty"` // Local authentication method provider resource ID + MethodId *string `json:"method_id,omitempty"` // User authentication method ID + Name *string `json:"name,omitempty"` // Name of the organization authentication method + OrganizationId *string `json:"organization_id,omitempty"` // Organization ID + RemoteProviderId string `json:"remote_provider_id"` // Remote authentication method provider ID + Type *string `json:"type,omitempty"` // Type of the organization authentication method + UserEmail *string `json:"user_email,omitempty"` // User's email address for the authentication method + UserId *string `json:"user_id,omitempty"` // User ID } type InvitationOut struct { - CreateTime time.Time `json:"create_time"` - ExpiryTime time.Time `json:"expiry_time"` - InvitedBy string `json:"invited_by"` - UserEmail string `json:"user_email"` + CreateTime time.Time `json:"create_time"` // Time of creating the invitation + ExpiryTime time.Time `json:"expiry_time"` // By when the invitation is valid + InvitedBy string `json:"invited_by"` // Name of the invitation creator + UserEmail string `json:"user_email"` // User Email } + +// OrganizationUserGetOut OrganizationUserGetResponse type OrganizationUserGetOut struct { - IsSuperAdmin bool `json:"is_super_admin"` - JoinTime time.Time `json:"join_time"` - LastActivityTime time.Time `json:"last_activity_time"` - UserId string `json:"user_id"` - UserInfo UserInfoOut `json:"user_info"` + IsSuperAdmin bool `json:"is_super_admin"` // Super admin state of the organization user + JoinTime time.Time `json:"join_time"` // Join time + LastActivityTime time.Time `json:"last_activity_time"` // Last activity time + UserId string `json:"user_id"` // User ID + UserInfo UserInfoOut `json:"user_info"` // OrganizationUserInfo } + +// OrganizationUserInvitationAcceptIn OrganizationUserInvitationAcceptRequestBody type OrganizationUserInvitationAcceptIn struct { - Action ActionType `json:"action,omitempty"` + Action ActionType `json:"action,omitempty"` // Action to be performed on the invitation } + +// OrganizationUserInviteIn OrganizationUserInviteRequestBody type OrganizationUserInviteIn struct { - UserEmail string `json:"user_email"` + UserEmail string `json:"user_email"` // User Email } type OrganizationUserStateType string @@ -246,58 +252,71 @@ func OrganizationUserStateTypeChoices() []string { return []string{"active", "deactivated", "deleted"} } +// OrganizationUserUpdateIn OrganizationUserUpdateRequestBody type OrganizationUserUpdateIn struct { City *string `json:"city,omitempty"` Country *string `json:"country,omitempty"` Department *string `json:"department,omitempty"` - IsSuperAdmin *bool `json:"is_super_admin,omitempty"` - JobTitle *string `json:"job_title,omitempty"` - RealName *string `json:"real_name,omitempty"` - State OrganizationUserStateType `json:"state,omitempty"` + IsSuperAdmin *bool `json:"is_super_admin,omitempty"` // Alters super admin state of the organization user + JobTitle *string `json:"job_title,omitempty"` // Job Title + RealName *string `json:"real_name,omitempty"` // Real Name + State OrganizationUserStateType `json:"state,omitempty"` // State of the user in the organization } + +// OrganizationUserUpdateOut OrganizationUserUpdateResponse type OrganizationUserUpdateOut struct { - IsSuperAdmin bool `json:"is_super_admin"` - JoinTime time.Time `json:"join_time"` - LastActivityTime time.Time `json:"last_activity_time"` - UserId string `json:"user_id"` - UserInfo UserInfoOut `json:"user_info"` + IsSuperAdmin bool `json:"is_super_admin"` // Super admin state of the organization user + JoinTime time.Time `json:"join_time"` // Join time + LastActivityTime time.Time `json:"last_activity_time"` // Last activity time + UserId string `json:"user_id"` // User ID + UserInfo UserInfoOut `json:"user_info"` // OrganizationUserInfo } type TokenOut struct { Description string `json:"description"` - LastIp string `json:"last_ip"` - LastUsedTime time.Time `json:"last_used_time"` - LastUserAgent string `json:"last_user_agent"` - TokenPrefix string `json:"token_prefix"` + LastIp string `json:"last_ip"` // Last-used IP + LastUsedTime time.Time `json:"last_used_time"` // Last-used time + LastUserAgent string `json:"last_user_agent"` // Last-used user agent + TokenPrefix string `json:"token_prefix"` // Token prefix } + +// UserInfoOut OrganizationUserInfo type UserInfoOut struct { City *string `json:"city,omitempty"` Country *string `json:"country,omitempty"` - CreateTime time.Time `json:"create_time"` + CreateTime time.Time `json:"create_time"` // Creation time Department *string `json:"department,omitempty"` - IsApplicationUser bool `json:"is_application_user"` - JobTitle *string `json:"job_title,omitempty"` - ManagedByScim bool `json:"managed_by_scim"` - ManagingOrganizationId *string `json:"managing_organization_id,omitempty"` - RealName string `json:"real_name"` + IsApplicationUser bool `json:"is_application_user"` // Is Application User + JobTitle *string `json:"job_title,omitempty"` // Job Title + ManagedByScim bool `json:"managed_by_scim"` // Managed By Scim + ManagingOrganizationId *string `json:"managing_organization_id,omitempty"` // Managing Organization ID + RealName string `json:"real_name"` // Real Name State string `json:"state"` - UserEmail string `json:"user_email"` + UserEmail string `json:"user_email"` // User Email } type UserOut struct { - IsSuperAdmin bool `json:"is_super_admin"` - JoinTime time.Time `json:"join_time"` - LastActivityTime time.Time `json:"last_activity_time"` - UserId string `json:"user_id"` - UserInfo UserInfoOut `json:"user_info"` + IsSuperAdmin bool `json:"is_super_admin"` // Super admin state of the organization user + JoinTime time.Time `json:"join_time"` // Join time + LastActivityTime time.Time `json:"last_activity_time"` // Last activity time + UserId string `json:"user_id"` // User ID + UserInfo UserInfoOut `json:"user_info"` // OrganizationUserInfo } + +// organizationUserAuthenticationMethodsListOut OrganizationUserAuthenticationMethodsListResponse type organizationUserAuthenticationMethodsListOut struct { - AuthenticationMethods []AuthenticationMethodOut `json:"authentication_methods"` + AuthenticationMethods []AuthenticationMethodOut `json:"authentication_methods"` // List of authentication methods for the organization user } + +// organizationUserInvitationsListOut OrganizationUserInvitationsListResponse type organizationUserInvitationsListOut struct { - Invitations []InvitationOut `json:"invitations"` + Invitations []InvitationOut `json:"invitations"` // List of user invitations for the organization } + +// organizationUserListOut OrganizationUserListResponse type organizationUserListOut struct { - Users []UserOut `json:"users"` + Users []UserOut `json:"users"` // List of users of the organization } + +// organizationUserTokensListOut OrganizationUserTokensListResponse type organizationUserTokensListOut struct { - Tokens []TokenOut `json:"tokens"` + Tokens []TokenOut `json:"tokens"` // List of user tokens accessible to the organization } diff --git a/handler/postgresql/postgresql.go b/handler/postgresql/postgresql.go index b663732..a1cca12 100644 --- a/handler/postgresql/postgresql.go +++ b/handler/postgresql/postgresql.go @@ -109,17 +109,19 @@ func (h *PostgreSQLHandler) ServicePGBouncerUpdate(ctx context.Context, project } type ExtensionOut struct { - Name string `json:"name"` - Versions []string `json:"versions,omitempty"` + Name string `json:"name"` // Extension name + Versions []string `json:"versions,omitempty"` // Extension versions available } type PgOut struct { - Extensions []ExtensionOut `json:"extensions"` - Version string `json:"version"` + Extensions []ExtensionOut `json:"extensions"` // Extensions available for loading with CREATE EXTENSION in this service + Version string `json:"version"` // PostgreSQL version } + +// PgserviceQueryStatisticsIn PGServiceQueryStatisticsRequestBody type PgserviceQueryStatisticsIn struct { - Limit *int `json:"limit,omitempty"` - Offset *int `json:"offset,omitempty"` - OrderBy *string `json:"order_by,omitempty"` + Limit *int `json:"limit,omitempty"` // Limit for number of results + Offset *int `json:"offset,omitempty"` // Offset for retrieved results based on sort order + OrderBy *string `json:"order_by,omitempty"` // Order in which to sort retrieved results } type PoolModeType string @@ -134,62 +136,72 @@ func PoolModeTypeChoices() []string { } type QueryOut struct { - BlkReadTime *float64 `json:"blk_read_time,omitempty"` - BlkWriteTime *float64 `json:"blk_write_time,omitempty"` - Calls *float64 `json:"calls,omitempty"` - DatabaseName *string `json:"database_name,omitempty"` - LocalBlksDirtied *float64 `json:"local_blks_dirtied,omitempty"` - LocalBlksHit *float64 `json:"local_blks_hit,omitempty"` - LocalBlksRead *float64 `json:"local_blks_read,omitempty"` - LocalBlksWritten *float64 `json:"local_blks_written,omitempty"` - MaxExecTime *float64 `json:"max_exec_time,omitempty"` - MaxPlanTime *float64 `json:"max_plan_time,omitempty"` - MaxTime *float64 `json:"max_time,omitempty"` - MeanExecTime *float64 `json:"mean_exec_time,omitempty"` - MeanPlanTime *float64 `json:"mean_plan_time,omitempty"` - MeanTime *float64 `json:"mean_time,omitempty"` - MinExecTime *float64 `json:"min_exec_time,omitempty"` - MinPlanTime *float64 `json:"min_plan_time,omitempty"` - MinTime *float64 `json:"min_time,omitempty"` - Query *string `json:"query,omitempty"` - Queryid *float64 `json:"queryid,omitempty"` - Rows *float64 `json:"rows,omitempty"` - SharedBlksDirtied *float64 `json:"shared_blks_dirtied,omitempty"` - SharedBlksHit *float64 `json:"shared_blks_hit,omitempty"` - SharedBlksRead *float64 `json:"shared_blks_read,omitempty"` - SharedBlksWritten *float64 `json:"shared_blks_written,omitempty"` - StddevExecTime *float64 `json:"stddev_exec_time,omitempty"` - StddevPlanTime *float64 `json:"stddev_plan_time,omitempty"` - StddevTime *float64 `json:"stddev_time,omitempty"` - TempBlksRead *float64 `json:"temp_blks_read,omitempty"` - TempBlksWritten *float64 `json:"temp_blks_written,omitempty"` - TotalExecTime *float64 `json:"total_exec_time,omitempty"` - TotalPlanTime *float64 `json:"total_plan_time,omitempty"` - TotalTime *float64 `json:"total_time,omitempty"` - UserName *string `json:"user_name,omitempty"` - WalBytes *string `json:"wal_bytes,omitempty"` - WalFpi *float64 `json:"wal_fpi,omitempty"` - WalRecords *float64 `json:"wal_records,omitempty"` -} + BlkReadTime *float64 `json:"blk_read_time,omitempty"` // Query statistic + BlkWriteTime *float64 `json:"blk_write_time,omitempty"` // Query statistic + Calls *float64 `json:"calls,omitempty"` // Query statistic + DatabaseName *string `json:"database_name,omitempty"` // Query statistic + LocalBlksDirtied *float64 `json:"local_blks_dirtied,omitempty"` // Query statistic + LocalBlksHit *float64 `json:"local_blks_hit,omitempty"` // Query statistic + LocalBlksRead *float64 `json:"local_blks_read,omitempty"` // Query statistic + LocalBlksWritten *float64 `json:"local_blks_written,omitempty"` // Query statistic + MaxExecTime *float64 `json:"max_exec_time,omitempty"` // Query statistic + MaxPlanTime *float64 `json:"max_plan_time,omitempty"` // Query statistic + MaxTime *float64 `json:"max_time,omitempty"` // Query statistic + MeanExecTime *float64 `json:"mean_exec_time,omitempty"` // Query statistic + MeanPlanTime *float64 `json:"mean_plan_time,omitempty"` // Query statistic + MeanTime *float64 `json:"mean_time,omitempty"` // Query statistic + MinExecTime *float64 `json:"min_exec_time,omitempty"` // Query statistic + MinPlanTime *float64 `json:"min_plan_time,omitempty"` // Query statistic + MinTime *float64 `json:"min_time,omitempty"` // Query statistic + Query *string `json:"query,omitempty"` // Query statistic + Queryid *float64 `json:"queryid,omitempty"` // Query statistic + Rows *float64 `json:"rows,omitempty"` // Query statistic + SharedBlksDirtied *float64 `json:"shared_blks_dirtied,omitempty"` // Query statistic + SharedBlksHit *float64 `json:"shared_blks_hit,omitempty"` // Query statistic + SharedBlksRead *float64 `json:"shared_blks_read,omitempty"` // Query statistic + SharedBlksWritten *float64 `json:"shared_blks_written,omitempty"` // Query statistic + StddevExecTime *float64 `json:"stddev_exec_time,omitempty"` // Query statistic + StddevPlanTime *float64 `json:"stddev_plan_time,omitempty"` // Query statistic + StddevTime *float64 `json:"stddev_time,omitempty"` // Query statistic + TempBlksRead *float64 `json:"temp_blks_read,omitempty"` // Query statistic + TempBlksWritten *float64 `json:"temp_blks_written,omitempty"` // Query statistic + TotalExecTime *float64 `json:"total_exec_time,omitempty"` // Query statistic + TotalPlanTime *float64 `json:"total_plan_time,omitempty"` // Query statistic + TotalTime *float64 `json:"total_time,omitempty"` // Query statistic + UserName *string `json:"user_name,omitempty"` // Query statistic + WalBytes *string `json:"wal_bytes,omitempty"` // Query statistic + WalFpi *float64 `json:"wal_fpi,omitempty"` // Query statistic + WalRecords *float64 `json:"wal_records,omitempty"` // Query statistic +} + +// ServicePgbouncerCreateIn ServicePGBouncerCreateRequestBody type ServicePgbouncerCreateIn struct { - Database string `json:"database"` - PoolMode PoolModeType `json:"pool_mode,omitempty"` - PoolName string `json:"pool_name"` - PoolSize *int `json:"pool_size,omitempty"` - Username *string `json:"username,omitempty"` + Database string `json:"database"` // Service database name + PoolMode PoolModeType `json:"pool_mode,omitempty"` // PGBouncer pool mode + PoolName string `json:"pool_name"` // Connection pool name + PoolSize *int `json:"pool_size,omitempty"` // Size of PGBouncer's PostgreSQL side connection pool + Username *string `json:"username,omitempty"` // Service username } + +// ServicePgbouncerUpdateIn ServicePGBouncerUpdateRequestBody type ServicePgbouncerUpdateIn struct { - Database *string `json:"database,omitempty"` - PoolMode PoolModeType `json:"pool_mode,omitempty"` - PoolSize *int `json:"pool_size,omitempty"` - Username *string `json:"username,omitempty"` + Database *string `json:"database,omitempty"` // Service database name + PoolMode PoolModeType `json:"pool_mode,omitempty"` // PGBouncer pool mode + PoolSize *int `json:"pool_size,omitempty"` // Size of PGBouncer's PostgreSQL side connection pool + Username *string `json:"username,omitempty"` // Service username } + +// pgAvailableExtensionsOut PgAvailableExtensionsResponse type pgAvailableExtensionsOut struct { - Pg []PgOut `json:"pg,omitempty"` + Pg []PgOut `json:"pg,omitempty"` // Supported PostgreSQL versions } + +// pgserviceAvailableExtensionsOut PGServiceAvailableExtensionsResponse type pgserviceAvailableExtensionsOut struct { - Extensions []ExtensionOut `json:"extensions"` + Extensions []ExtensionOut `json:"extensions"` // Extensions available for loading with CREATE EXTENSION in this service } + +// pgserviceQueryStatisticsOut PGServiceQueryStatisticsResponse type pgserviceQueryStatisticsOut struct { - Queries []QueryOut `json:"queries"` + Queries []QueryOut `json:"queries"` // List of query statistics } diff --git a/handler/privatelink/privatelink.go b/handler/privatelink/privatelink.go index 671f18c..2131824 100644 --- a/handler/privatelink/privatelink.go +++ b/handler/privatelink/privatelink.go @@ -259,16 +259,16 @@ func (h *PrivatelinkHandler) ServicePrivatelinkAzureUpdate(ctx context.Context, } type ConnectionOut struct { - DnsName string `json:"dns_name"` - PrivatelinkConnectionId *string `json:"privatelink_connection_id,omitempty"` - State ConnectionStateType `json:"state"` - VpcEndpointId string `json:"vpc_endpoint_id"` + DnsName string `json:"dns_name"` // AWS VPC Endpoint DNS name + PrivatelinkConnectionId *string `json:"privatelink_connection_id,omitempty"` // Privatelink connection ID + State ConnectionStateType `json:"state"` // Privatelink connection state + VpcEndpointId string `json:"vpc_endpoint_id"` // AWS VPC Endpoint ID } type ConnectionOutAlt struct { - PrivateEndpointId string `json:"private_endpoint_id"` - PrivatelinkConnectionId *string `json:"privatelink_connection_id,omitempty"` - State ConnectionStateType `json:"state"` - UserIpAddress string `json:"user_ip_address"` + PrivateEndpointId string `json:"private_endpoint_id"` // Azure private endpoint ID + PrivatelinkConnectionId *string `json:"privatelink_connection_id,omitempty"` // Privatelink connection ID + State ConnectionStateType `json:"state"` // Privatelink connection state + UserIpAddress string `json:"user_ip_address"` // (Private) IP address of Privatelink endpoint } type ConnectionStateType string @@ -284,17 +284,29 @@ func ConnectionStateTypeChoices() []string { } type PrivatelinkAvailabilityOut struct { - CloudName string `json:"cloud_name"` - PriceUsd string `json:"price_usd"` + CloudName string `json:"cloud_name"` // Target cloud + PriceUsd string `json:"price_usd"` // Hourly privatelink price in this cloud region } + +// ServicePrivatelinkAwscreateIn ServicePrivatelinkAWSCreateRequestBody type ServicePrivatelinkAwscreateIn struct { - Principals []string `json:"principals"` + Principals []string `json:"principals"` /* + ARN allowlist + + ARNs of principals allowed connecting to the service + */ } + +// ServicePrivatelinkAwscreateOut ServicePrivatelinkAWSCreateResponse type ServicePrivatelinkAwscreateOut struct { - AwsServiceId *string `json:"aws_service_id,omitempty"` - AwsServiceName *string `json:"aws_service_name,omitempty"` - Principals []string `json:"principals"` - State ServicePrivatelinkAwscreateStateType `json:"state"` + AwsServiceId *string `json:"aws_service_id,omitempty"` // AWS VPC endpoint service ID + AwsServiceName *string `json:"aws_service_name,omitempty"` // AWS VPC endpoint service name + Principals []string `json:"principals"` /* + ARN allowlist + + ARNs of principals allowed connecting to the service + */ + State ServicePrivatelinkAwscreateStateType `json:"state"` // Privatelink resource state } type ServicePrivatelinkAwscreateStateType string @@ -308,11 +320,16 @@ func ServicePrivatelinkAwscreateStateTypeChoices() []string { return []string{"creating", "active", "deleting"} } +// ServicePrivatelinkAwsdeleteOut ServicePrivatelinkAWSDeleteResponse type ServicePrivatelinkAwsdeleteOut struct { - AwsServiceId *string `json:"aws_service_id,omitempty"` - AwsServiceName *string `json:"aws_service_name,omitempty"` - Principals []string `json:"principals"` - State ServicePrivatelinkAwsdeleteStateType `json:"state"` + AwsServiceId *string `json:"aws_service_id,omitempty"` // AWS VPC endpoint service ID + AwsServiceName *string `json:"aws_service_name,omitempty"` // AWS VPC endpoint service name + Principals []string `json:"principals"` /* + ARN allowlist + + ARNs of principals allowed connecting to the service + */ + State ServicePrivatelinkAwsdeleteStateType `json:"state"` // Privatelink resource state } type ServicePrivatelinkAwsdeleteStateType string @@ -326,11 +343,16 @@ func ServicePrivatelinkAwsdeleteStateTypeChoices() []string { return []string{"creating", "active", "deleting"} } +// ServicePrivatelinkAwsgetOut ServicePrivatelinkAWSGetResponse type ServicePrivatelinkAwsgetOut struct { - AwsServiceId *string `json:"aws_service_id,omitempty"` - AwsServiceName *string `json:"aws_service_name,omitempty"` - Principals []string `json:"principals"` - State ServicePrivatelinkAwsgetStateType `json:"state"` + AwsServiceId *string `json:"aws_service_id,omitempty"` // AWS VPC endpoint service ID + AwsServiceName *string `json:"aws_service_name,omitempty"` // AWS VPC endpoint service name + Principals []string `json:"principals"` /* + ARN allowlist + + ARNs of principals allowed connecting to the service + */ + State ServicePrivatelinkAwsgetStateType `json:"state"` // Privatelink resource state } type ServicePrivatelinkAwsgetStateType string @@ -344,14 +366,25 @@ func ServicePrivatelinkAwsgetStateTypeChoices() []string { return []string{"creating", "active", "deleting"} } +// ServicePrivatelinkAwsupdateIn ServicePrivatelinkAWSUpdateRequestBody type ServicePrivatelinkAwsupdateIn struct { - Principals []string `json:"principals"` + Principals []string `json:"principals"` /* + ARN allowlist + + ARNs of principals allowed connecting to the service + */ } + +// ServicePrivatelinkAwsupdateOut ServicePrivatelinkAWSUpdateResponse type ServicePrivatelinkAwsupdateOut struct { - AwsServiceId *string `json:"aws_service_id,omitempty"` - AwsServiceName *string `json:"aws_service_name,omitempty"` - Principals []string `json:"principals"` - State ServicePrivatelinkAwsupdateStateType `json:"state"` + AwsServiceId *string `json:"aws_service_id,omitempty"` // AWS VPC endpoint service ID + AwsServiceName *string `json:"aws_service_name,omitempty"` // AWS VPC endpoint service name + Principals []string `json:"principals"` /* + ARN allowlist + + ARNs of principals allowed connecting to the service + */ + State ServicePrivatelinkAwsupdateStateType `json:"state"` // Privatelink resource state } type ServicePrivatelinkAwsupdateStateType string @@ -365,11 +398,12 @@ func ServicePrivatelinkAwsupdateStateTypeChoices() []string { return []string{"creating", "active", "deleting"} } +// ServicePrivatelinkAzureConnectionApprovalOut ServicePrivatelinkAzureConnectionApprovalResponse type ServicePrivatelinkAzureConnectionApprovalOut struct { - PrivateEndpointId string `json:"private_endpoint_id"` - PrivatelinkConnectionId *string `json:"privatelink_connection_id,omitempty"` - State ServicePrivatelinkAzureConnectionApprovalStateType `json:"state"` - UserIpAddress string `json:"user_ip_address"` + PrivateEndpointId string `json:"private_endpoint_id"` // Azure private endpoint ID + PrivatelinkConnectionId *string `json:"privatelink_connection_id,omitempty"` // Privatelink connection ID + State ServicePrivatelinkAzureConnectionApprovalStateType `json:"state"` // Privatelink connection state + UserIpAddress string `json:"user_ip_address"` // (Private) IP address of Privatelink endpoint } type ServicePrivatelinkAzureConnectionApprovalStateType string @@ -397,35 +431,62 @@ func ServicePrivatelinkAzureConnectionStateTypeChoices() []string { return []string{"pending-user-approval", "user-approved", "connected", "active"} } +// ServicePrivatelinkAzureConnectionUpdateIn ServicePrivatelinkAzureConnectionUpdateRequestBody type ServicePrivatelinkAzureConnectionUpdateIn struct { - UserIpAddress string `json:"user_ip_address"` + UserIpAddress string `json:"user_ip_address"` // (Private) IP address of Privatelink endpoint } + +// ServicePrivatelinkAzureConnectionUpdateOut ServicePrivatelinkAzureConnectionUpdateResponse type ServicePrivatelinkAzureConnectionUpdateOut struct { - PrivateEndpointId string `json:"private_endpoint_id"` - PrivatelinkConnectionId *string `json:"privatelink_connection_id,omitempty"` - State ServicePrivatelinkAzureConnectionStateType `json:"state"` - UserIpAddress string `json:"user_ip_address"` + PrivateEndpointId string `json:"private_endpoint_id"` // Azure private endpoint ID + PrivatelinkConnectionId *string `json:"privatelink_connection_id,omitempty"` // Privatelink connection ID + State ServicePrivatelinkAzureConnectionStateType `json:"state"` // Privatelink connection state + UserIpAddress string `json:"user_ip_address"` // (Private) IP address of Privatelink endpoint } + +// ServicePrivatelinkAzureCreateIn ServicePrivatelinkAzureCreateRequestBody type ServicePrivatelinkAzureCreateIn struct { - UserSubscriptionIds []string `json:"user_subscription_ids"` + UserSubscriptionIds []string `json:"user_subscription_ids"` /* + Subscription ID allowlist + + IDs of Azure subscriptions allowed to connect to the service + */ } + +// ServicePrivatelinkAzureCreateOut ServicePrivatelinkAzureCreateResponse type ServicePrivatelinkAzureCreateOut struct { - AzureServiceAlias *string `json:"azure_service_alias,omitempty"` - AzureServiceId *string `json:"azure_service_id,omitempty"` - State ServicePrivatelinkAzureStateType `json:"state"` - UserSubscriptionIds []string `json:"user_subscription_ids"` + AzureServiceAlias *string `json:"azure_service_alias,omitempty"` // Azure Privatelink service alias + AzureServiceId *string `json:"azure_service_id,omitempty"` // Azure Privatelink service ID + State ServicePrivatelinkAzureStateType `json:"state"` // Privatelink resource state + UserSubscriptionIds []string `json:"user_subscription_ids"` /* + Subscription ID allowlist + + IDs of Azure subscriptions allowed to connect to the service + */ } + +// ServicePrivatelinkAzureDeleteOut ServicePrivatelinkAzureDeleteResponse type ServicePrivatelinkAzureDeleteOut struct { - AzureServiceAlias *string `json:"azure_service_alias,omitempty"` - AzureServiceId *string `json:"azure_service_id,omitempty"` - State ServicePrivatelinkAzureStateType `json:"state"` - UserSubscriptionIds []string `json:"user_subscription_ids"` + AzureServiceAlias *string `json:"azure_service_alias,omitempty"` // Azure Privatelink service alias + AzureServiceId *string `json:"azure_service_id,omitempty"` // Azure Privatelink service ID + State ServicePrivatelinkAzureStateType `json:"state"` // Privatelink resource state + UserSubscriptionIds []string `json:"user_subscription_ids"` /* + Subscription ID allowlist + + IDs of Azure subscriptions allowed to connect to the service + */ } + +// ServicePrivatelinkAzureGetOut ServicePrivatelinkAzureGetResponse type ServicePrivatelinkAzureGetOut struct { - AzureServiceAlias *string `json:"azure_service_alias,omitempty"` - AzureServiceId *string `json:"azure_service_id,omitempty"` - State ServicePrivatelinkAzureStateType `json:"state"` - UserSubscriptionIds []string `json:"user_subscription_ids"` + AzureServiceAlias *string `json:"azure_service_alias,omitempty"` // Azure Privatelink service alias + AzureServiceId *string `json:"azure_service_id,omitempty"` // Azure Privatelink service ID + State ServicePrivatelinkAzureStateType `json:"state"` // Privatelink resource state + UserSubscriptionIds []string `json:"user_subscription_ids"` /* + Subscription ID allowlist + + IDs of Azure subscriptions allowed to connect to the service + */ } type ServicePrivatelinkAzureStateType string @@ -439,21 +500,38 @@ func ServicePrivatelinkAzureStateTypeChoices() []string { return []string{"creating", "active", "deleting"} } +// ServicePrivatelinkAzureUpdateIn ServicePrivatelinkAzureUpdateRequestBody type ServicePrivatelinkAzureUpdateIn struct { - UserSubscriptionIds []string `json:"user_subscription_ids"` + UserSubscriptionIds []string `json:"user_subscription_ids"` /* + Subscription ID allowlist + + IDs of Azure subscriptions allowed to connect to the service + */ } + +// ServicePrivatelinkAzureUpdateOut ServicePrivatelinkAzureUpdateResponse type ServicePrivatelinkAzureUpdateOut struct { - AzureServiceAlias *string `json:"azure_service_alias,omitempty"` - AzureServiceId *string `json:"azure_service_id,omitempty"` - State ServicePrivatelinkAzureStateType `json:"state"` - UserSubscriptionIds []string `json:"user_subscription_ids"` + AzureServiceAlias *string `json:"azure_service_alias,omitempty"` // Azure Privatelink service alias + AzureServiceId *string `json:"azure_service_id,omitempty"` // Azure Privatelink service ID + State ServicePrivatelinkAzureStateType `json:"state"` // Privatelink resource state + UserSubscriptionIds []string `json:"user_subscription_ids"` /* + Subscription ID allowlist + + IDs of Azure subscriptions allowed to connect to the service + */ } + +// publicPrivatelinkAvailabilityListOut PublicPrivatelinkAvailabilityListResponse type publicPrivatelinkAvailabilityListOut struct { - PrivatelinkAvailability []PrivatelinkAvailabilityOut `json:"privatelink_availability"` + PrivatelinkAvailability []PrivatelinkAvailabilityOut `json:"privatelink_availability"` // Privatelink pricing information for supported clouds } + +// servicePrivatelinkAwsconnectionListOut ServicePrivatelinkAWSConnectionListResponse type servicePrivatelinkAwsconnectionListOut struct { - Connections []ConnectionOut `json:"connections"` + Connections []ConnectionOut `json:"connections"` // AWS Privatelink VPC Endpoint connection list } + +// servicePrivatelinkAzureConnectionListOut ServicePrivatelinkAzureConnectionListResponse type servicePrivatelinkAzureConnectionListOut struct { - Connections []ConnectionOutAlt `json:"connections"` + Connections []ConnectionOutAlt `json:"connections"` // Private endpoint connection list } diff --git a/handler/project/project.go b/handler/project/project.go index 5947106..580a052 100644 --- a/handler/project/project.go +++ b/handler/project/project.go @@ -330,13 +330,13 @@ func (h *ProjectHandler) ProjectUserUpdate(ctx context.Context, project string, } type AlertOut struct { - CreateTime time.Time `json:"create_time"` - Event string `json:"event"` - NodeName *string `json:"node_name,omitempty"` - ProjectName string `json:"project_name"` - ServiceName *string `json:"service_name,omitempty"` - ServiceType *string `json:"service_type,omitempty"` - Severity string `json:"severity"` + CreateTime time.Time `json:"create_time"` // Event creation timestamp (ISO 8601) + Event string `json:"event"` // Name of the alerting event + NodeName *string `json:"node_name,omitempty"` // Name of the service node + ProjectName string `json:"project_name"` // Project name + ServiceName *string `json:"service_name,omitempty"` // Service name + ServiceType *string `json:"service_type,omitempty"` // Service type code + Severity string `json:"severity"` // Severity of the event } type AnyType string @@ -373,48 +373,54 @@ func BillingCurrencyTypeChoices() []string { } type BillingEmailIn struct { - Email string `json:"email"` + Email string `json:"email"` // User email address } type BillingEmailOut struct { - Email string `json:"email"` + Email string `json:"email"` // User email address } + +// CardInfoOut Credit card assigned to the project type CardInfoOut struct { Brand string `json:"brand"` - CardId string `json:"card_id"` + CardId string `json:"card_id"` // Credit card ID Country string `json:"country"` - CountryCode string `json:"country_code"` - ExpMonth int `json:"exp_month"` - ExpYear int `json:"exp_year"` - Last4 string `json:"last4"` - Name string `json:"name"` - UserEmail string `json:"user_email"` + CountryCode string `json:"country_code"` // Two letter ISO country code + ExpMonth int `json:"exp_month"` // Expiration month + ExpYear int `json:"exp_year"` // Expiration year + Last4 string `json:"last4"` // Credit card last four digits + Name string `json:"name"` // Name on the credit card + UserEmail string `json:"user_email"` // User email address } + +// ElasticsearchOut Service EOL extension type ElasticsearchOut struct { - EolDate string `json:"eol_date"` - Version string `json:"version"` + EolDate string `json:"eol_date"` // Extended EOL date + Version string `json:"version"` // Service version } + +// EndOfLifeExtensionOut End of life extension information type EndOfLifeExtensionOut struct { - Elasticsearch *ElasticsearchOut `json:"elasticsearch,omitempty"` + Elasticsearch *ElasticsearchOut `json:"elasticsearch,omitempty"` // Service EOL extension } type EventOut struct { - Actor string `json:"actor"` - EventDesc string `json:"event_desc"` - EventType string `json:"event_type"` - Id string `json:"id"` - ServiceName string `json:"service_name"` - Time string `json:"time"` + Actor string `json:"actor"` // Initiator of the event + EventDesc string `json:"event_desc"` // Event description + EventType string `json:"event_type"` // Event type identifier + Id string `json:"id"` // Event identifier (unique across all projects) + ServiceName string `json:"service_name"` // Service name + Time string `json:"time"` // Timestamp in ISO 8601 format, always in UTC } type GroupUserOut struct { - MemberType MemberType `json:"member_type"` - RealName string `json:"real_name"` - UserEmail string `json:"user_email"` - UserGroupId string `json:"user_group_id"` + MemberType MemberType `json:"member_type"` // Project member type + RealName string `json:"real_name"` // User real name + UserEmail string `json:"user_email"` // User email address + UserGroupId string `json:"user_group_id"` // User group ID } type InvitationOut struct { - InviteTime time.Time `json:"invite_time"` - InvitedUserEmail string `json:"invited_user_email"` - InvitingUserEmail string `json:"inviting_user_email"` - MemberType MemberType `json:"member_type"` + InviteTime time.Time `json:"invite_time"` // Timestamp in ISO 8601 format, always in UTC + InvitedUserEmail string `json:"invited_user_email"` // User email address + InvitingUserEmail string `json:"inviting_user_email"` // User email address + MemberType MemberType `json:"member_type"` // Project member type } type MemberType string @@ -430,230 +436,258 @@ func MemberTypeChoices() []string { } type PrivatelinkAvailabilityOut struct { - CloudName string `json:"cloud_name"` - PriceUsd string `json:"price_usd"` + CloudName string `json:"cloud_name"` // Target cloud + PriceUsd string `json:"price_usd"` // Hourly privatelink price in this cloud region } + +// ProjectCreateIn ProjectCreateRequestBody type ProjectCreateIn struct { - AccountId *string `json:"account_id,omitempty"` - AddAccountOwnersAdminAccess *bool `json:"add_account_owners_admin_access,omitempty"` - AddressLines *[]string `json:"address_lines,omitempty"` - BasePort *int `json:"base_port,omitempty"` - BillingAddress *string `json:"billing_address,omitempty"` - BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` - BillingEmails *[]BillingEmailIn `json:"billing_emails,omitempty"` - BillingExtraText *string `json:"billing_extra_text,omitempty"` - BillingGroupId *string `json:"billing_group_id,omitempty"` - CardId *string `json:"card_id,omitempty"` - City *string `json:"city,omitempty"` - Cloud *string `json:"cloud,omitempty"` - Company *string `json:"company,omitempty"` - CopyFromProject *string `json:"copy_from_project,omitempty"` - CopyTags *bool `json:"copy_tags,omitempty"` - CountryCode *string `json:"country_code,omitempty"` - Project string `json:"project"` - State *string `json:"state,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - TechEmails *[]TechEmailIn `json:"tech_emails,omitempty"` - UseSourceProjectBillingGroup *bool `json:"use_source_project_billing_group,omitempty"` - VatId *string `json:"vat_id,omitempty"` - ZipCode *string `json:"zip_code,omitempty"` -} + 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 + BasePort *int `json:"base_port,omitempty"` // Base value that new services in this project will use to derive their port numbers. + 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 + 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 + 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 + Project string `json:"project"` // Project name + 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"` // Use the same billing group that is used in source project. + VatId *string `json:"vat_id,omitempty"` // [DEPRECATED] EU VAT identification + ZipCode *string `json:"zip_code,omitempty"` // [DEPRECATED] Address zip code +} + +// ProjectCreateOut Project information type ProjectCreateOut struct { - AccountId string `json:"account_id"` - AccountName *string `json:"account_name,omitempty"` - AddressLines []string `json:"address_lines,omitempty"` - AvailableCredits *string `json:"available_credits,omitempty"` - BillingAddress string `json:"billing_address"` - BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` - BillingEmails []BillingEmailOut `json:"billing_emails"` - BillingExtraText *string `json:"billing_extra_text,omitempty"` - BillingGroupId string `json:"billing_group_id"` - BillingGroupName string `json:"billing_group_name"` - CardInfo *CardInfoOut `json:"card_info,omitempty"` - City *string `json:"city,omitempty"` - Company *string `json:"company,omitempty"` - Country string `json:"country"` - CountryCode string `json:"country_code"` - DefaultCloud string `json:"default_cloud"` - EndOfLifeExtension *EndOfLifeExtensionOut `json:"end_of_life_extension,omitempty"` - EstimatedBalance string `json:"estimated_balance"` - EstimatedBalanceLocal *string `json:"estimated_balance_local,omitempty"` - Features map[string]any `json:"features,omitempty"` - OrganizationId string `json:"organization_id"` - PaymentMethod string `json:"payment_method"` - ProjectName string `json:"project_name"` - State *string `json:"state,omitempty"` - Tags map[string]string `json:"tags,omitempty"` - TechEmails []TechEmailOut `json:"tech_emails,omitempty"` - TenantId *string `json:"tenant_id,omitempty"` - TrialExpirationTime *time.Time `json:"trial_expiration_time,omitempty"` - VatId string `json:"vat_id"` - ZipCode *string `json:"zip_code,omitempty"` -} + AccountId string `json:"account_id"` // Account ID + AccountName *string `json:"account_name,omitempty"` // Account name + AddressLines []string `json:"address_lines,omitempty"` // Address lines + AvailableCredits *string `json:"available_credits,omitempty"` // Available credits, in USD + BillingAddress string `json:"billing_address"` // DEPRECATED: use split address fields like company, address_lines, zip_code, city and state instead + BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` // Billing currency + BillingEmails []BillingEmailOut `json:"billing_emails"` // List of project billing email addresses + BillingExtraText *string `json:"billing_extra_text,omitempty"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number + BillingGroupId string `json:"billing_group_id"` // Billing group ID + BillingGroupName string `json:"billing_group_name"` // Billing group name + CardInfo *CardInfoOut `json:"card_info,omitempty"` // Credit card assigned to the project + City *string `json:"city,omitempty"` // Address city + Company *string `json:"company,omitempty"` // Name of a company + Country string `json:"country"` // Billing country + CountryCode string `json:"country_code"` // Two letter ISO country code + DefaultCloud string `json:"default_cloud"` // Default cloud to use when launching services + EndOfLifeExtension *EndOfLifeExtensionOut `json:"end_of_life_extension,omitempty"` // End of life extension information + EstimatedBalance string `json:"estimated_balance"` // Estimated balance, in USD + EstimatedBalanceLocal *string `json:"estimated_balance_local,omitempty"` // Estimated balance, in billing currency + Features map[string]any `json:"features,omitempty"` // Feature flags + OrganizationId string `json:"organization_id"` // Organization ID + PaymentMethod string `json:"payment_method"` // Payment method + ProjectName string `json:"project_name"` // Project name + State *string `json:"state,omitempty"` // Address state + Tags map[string]string `json:"tags,omitempty"` // Set of resource tags + TechEmails []TechEmailOut `json:"tech_emails,omitempty"` // List of project tech email addresses + TenantId *string `json:"tenant_id,omitempty"` // Tenant ID + TrialExpirationTime *time.Time `json:"trial_expiration_time,omitempty"` // Trial expiration time (ISO 8601) + VatId string `json:"vat_id"` // EU VAT Identification Number + ZipCode *string `json:"zip_code,omitempty"` // Address zip code +} + +// ProjectGetOut Project information type ProjectGetOut struct { - AccountId string `json:"account_id"` - AccountName *string `json:"account_name,omitempty"` - AddressLines []string `json:"address_lines,omitempty"` - AvailableCredits *string `json:"available_credits,omitempty"` - BillingAddress string `json:"billing_address"` - BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` - BillingEmails []BillingEmailOut `json:"billing_emails"` - BillingExtraText *string `json:"billing_extra_text,omitempty"` - BillingGroupId string `json:"billing_group_id"` - BillingGroupName string `json:"billing_group_name"` - CardInfo *CardInfoOut `json:"card_info,omitempty"` - City *string `json:"city,omitempty"` - Company *string `json:"company,omitempty"` - Country string `json:"country"` - CountryCode string `json:"country_code"` - DefaultCloud string `json:"default_cloud"` - EndOfLifeExtension *EndOfLifeExtensionOut `json:"end_of_life_extension,omitempty"` - EstimatedBalance string `json:"estimated_balance"` - EstimatedBalanceLocal *string `json:"estimated_balance_local,omitempty"` - Features map[string]any `json:"features,omitempty"` - OrganizationId string `json:"organization_id"` - PaymentMethod string `json:"payment_method"` - ProjectName string `json:"project_name"` - State *string `json:"state,omitempty"` - Tags map[string]string `json:"tags,omitempty"` - TechEmails []TechEmailOut `json:"tech_emails,omitempty"` - TenantId *string `json:"tenant_id,omitempty"` - TrialExpirationTime *time.Time `json:"trial_expiration_time,omitempty"` - VatId string `json:"vat_id"` - ZipCode *string `json:"zip_code,omitempty"` -} + AccountId string `json:"account_id"` // Account ID + AccountName *string `json:"account_name,omitempty"` // Account name + AddressLines []string `json:"address_lines,omitempty"` // Address lines + AvailableCredits *string `json:"available_credits,omitempty"` // Available credits, in USD + BillingAddress string `json:"billing_address"` // DEPRECATED: use split address fields like company, address_lines, zip_code, city and state instead + BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` // Billing currency + BillingEmails []BillingEmailOut `json:"billing_emails"` // List of project billing email addresses + BillingExtraText *string `json:"billing_extra_text,omitempty"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number + BillingGroupId string `json:"billing_group_id"` // Billing group ID + BillingGroupName string `json:"billing_group_name"` // Billing group name + CardInfo *CardInfoOut `json:"card_info,omitempty"` // Credit card assigned to the project + City *string `json:"city,omitempty"` // Address city + Company *string `json:"company,omitempty"` // Name of a company + Country string `json:"country"` // Billing country + CountryCode string `json:"country_code"` // Two letter ISO country code + DefaultCloud string `json:"default_cloud"` // Default cloud to use when launching services + EndOfLifeExtension *EndOfLifeExtensionOut `json:"end_of_life_extension,omitempty"` // End of life extension information + EstimatedBalance string `json:"estimated_balance"` // Estimated balance, in USD + EstimatedBalanceLocal *string `json:"estimated_balance_local,omitempty"` // Estimated balance, in billing currency + Features map[string]any `json:"features,omitempty"` // Feature flags + OrganizationId string `json:"organization_id"` // Organization ID + PaymentMethod string `json:"payment_method"` // Payment method + ProjectName string `json:"project_name"` // Project name + State *string `json:"state,omitempty"` // Address state + Tags map[string]string `json:"tags,omitempty"` // Set of resource tags + TechEmails []TechEmailOut `json:"tech_emails,omitempty"` // List of project tech email addresses + TenantId *string `json:"tenant_id,omitempty"` // Tenant ID + TrialExpirationTime *time.Time `json:"trial_expiration_time,omitempty"` // Trial expiration time (ISO 8601) + VatId string `json:"vat_id"` // EU VAT Identification Number + ZipCode *string `json:"zip_code,omitempty"` // Address zip code +} + +// ProjectInviteAcceptOut Details of verified invite type ProjectInviteAcceptOut struct { - UserEmail string `json:"user_email"` + UserEmail string `json:"user_email"` // User email address } + +// ProjectInviteIn ProjectInviteRequestBody type ProjectInviteIn struct { - MemberType MemberType `json:"member_type,omitempty"` - UserEmail string `json:"user_email"` + MemberType MemberType `json:"member_type,omitempty"` // Project member type + UserEmail string `json:"user_email"` // User email address } + +// ProjectListOut ProjectListResponse type ProjectListOut struct { - ProjectMembership ProjectMembershipOut `json:"project_membership"` - ProjectMemberships *ProjectMembershipsOut `json:"project_memberships,omitempty"` - Projects []ProjectOut `json:"projects"` + ProjectMembership ProjectMembershipOut `json:"project_membership"` // Project membership and type of membership + ProjectMemberships *ProjectMembershipsOut `json:"project_memberships,omitempty"` // List of project membership and type of membership + Projects []ProjectOut `json:"projects"` // List of projects } + +// ProjectMembershipOut Project membership and type of membership type ProjectMembershipOut struct { - Any AnyType `json:"ANY,omitempty"` + Any AnyType `json:"ANY,omitempty"` // Project member type } + +// ProjectMembershipsOut List of project membership and type of membership type ProjectMembershipsOut struct { - Any []string `json:"ANY,omitempty"` + Any []string `json:"ANY,omitempty"` // List of project member type } type ProjectOut struct { - AccountId string `json:"account_id"` - AccountName *string `json:"account_name,omitempty"` - AddressLines []string `json:"address_lines,omitempty"` - AvailableCredits *string `json:"available_credits,omitempty"` - BillingAddress string `json:"billing_address"` - BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` - BillingEmails []BillingEmailOut `json:"billing_emails"` - BillingExtraText *string `json:"billing_extra_text,omitempty"` - BillingGroupId string `json:"billing_group_id"` - BillingGroupName string `json:"billing_group_name"` - CardInfo *CardInfoOut `json:"card_info,omitempty"` - City *string `json:"city,omitempty"` - Company *string `json:"company,omitempty"` - Country string `json:"country"` - CountryCode string `json:"country_code"` - DefaultCloud string `json:"default_cloud"` - EndOfLifeExtension *EndOfLifeExtensionOut `json:"end_of_life_extension,omitempty"` - EstimatedBalance string `json:"estimated_balance"` - EstimatedBalanceLocal *string `json:"estimated_balance_local,omitempty"` - Features map[string]any `json:"features,omitempty"` - OrganizationId string `json:"organization_id"` - PaymentMethod string `json:"payment_method"` - ProjectName string `json:"project_name"` - State *string `json:"state,omitempty"` - Tags map[string]string `json:"tags,omitempty"` - TechEmails []TechEmailOut `json:"tech_emails,omitempty"` - TenantId *string `json:"tenant_id,omitempty"` - TrialExpirationTime *time.Time `json:"trial_expiration_time,omitempty"` - VatId string `json:"vat_id"` - ZipCode *string `json:"zip_code,omitempty"` -} + AccountId string `json:"account_id"` // Account ID + AccountName *string `json:"account_name,omitempty"` // Account name + AddressLines []string `json:"address_lines,omitempty"` // Address lines + AvailableCredits *string `json:"available_credits,omitempty"` // Available credits, in USD + BillingAddress string `json:"billing_address"` // DEPRECATED: use split address fields like company, address_lines, zip_code, city and state instead + BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` // Billing currency + BillingEmails []BillingEmailOut `json:"billing_emails"` // List of project billing email addresses + BillingExtraText *string `json:"billing_extra_text,omitempty"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number + BillingGroupId string `json:"billing_group_id"` // Billing group ID + BillingGroupName string `json:"billing_group_name"` // Billing group name + CardInfo *CardInfoOut `json:"card_info,omitempty"` // Credit card assigned to the project + City *string `json:"city,omitempty"` // Address city + Company *string `json:"company,omitempty"` // Name of a company + Country string `json:"country"` // Billing country + CountryCode string `json:"country_code"` // Two letter ISO country code + DefaultCloud string `json:"default_cloud"` // Default cloud to use when launching services + EndOfLifeExtension *EndOfLifeExtensionOut `json:"end_of_life_extension,omitempty"` // End of life extension information + EstimatedBalance string `json:"estimated_balance"` // Estimated balance, in USD + EstimatedBalanceLocal *string `json:"estimated_balance_local,omitempty"` // Estimated balance, in billing currency + Features map[string]any `json:"features,omitempty"` // Feature flags + OrganizationId string `json:"organization_id"` // Organization ID + PaymentMethod string `json:"payment_method"` // Payment method + ProjectName string `json:"project_name"` // Project name + State *string `json:"state,omitempty"` // Address state + Tags map[string]string `json:"tags,omitempty"` // Set of resource tags + TechEmails []TechEmailOut `json:"tech_emails,omitempty"` // List of project tech email addresses + TenantId *string `json:"tenant_id,omitempty"` // Tenant ID + TrialExpirationTime *time.Time `json:"trial_expiration_time,omitempty"` // Trial expiration time (ISO 8601) + VatId string `json:"vat_id"` // EU VAT Identification Number + ZipCode *string `json:"zip_code,omitempty"` // Address zip code +} + +// ProjectTagsReplaceIn ProjectTagsReplaceRequestBody type ProjectTagsReplaceIn struct { - Tags map[string]string `json:"tags"` + Tags map[string]string `json:"tags"` // Set of resource tags } + +// ProjectTagsUpdateIn ProjectTagsUpdateRequestBody type ProjectTagsUpdateIn struct { - Tags map[string]string `json:"tags"` + Tags map[string]string `json:"tags"` // Set of resource tags } + +// ProjectUpdateIn ProjectUpdateRequestBody type ProjectUpdateIn struct { - AccountId *string `json:"account_id,omitempty"` - AddAccountOwnersAdminAccess *bool `json:"add_account_owners_admin_access,omitempty"` - AddressLines *[]string `json:"address_lines,omitempty"` - BillingAddress *string `json:"billing_address,omitempty"` - BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` - BillingEmails *[]BillingEmailIn `json:"billing_emails,omitempty"` - BillingExtraText *string `json:"billing_extra_text,omitempty"` - BillingGroupId *string `json:"billing_group_id,omitempty"` - CardId *string `json:"card_id,omitempty"` - City *string `json:"city,omitempty"` - Cloud *string `json:"cloud,omitempty"` - Company *string `json:"company,omitempty"` - CountryCode *string `json:"country_code,omitempty"` - ProjectName *string `json:"project_name,omitempty"` - State *string `json:"state,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - TechEmails *[]TechEmailIn `json:"tech_emails,omitempty"` - VatId *string `json:"vat_id,omitempty"` - ZipCode *string `json:"zip_code,omitempty"` -} + 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 + 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 + 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 + 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 + ProjectName *string `json:"project_name,omitempty"` // Project name + 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 +} + +// ProjectUpdateOut Project information type ProjectUpdateOut struct { - AccountId string `json:"account_id"` - AccountName *string `json:"account_name,omitempty"` - AddressLines []string `json:"address_lines,omitempty"` - AvailableCredits *string `json:"available_credits,omitempty"` - BillingAddress string `json:"billing_address"` - BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` - BillingEmails []BillingEmailOut `json:"billing_emails"` - BillingExtraText *string `json:"billing_extra_text,omitempty"` - BillingGroupId string `json:"billing_group_id"` - BillingGroupName string `json:"billing_group_name"` - CardInfo *CardInfoOut `json:"card_info,omitempty"` - City *string `json:"city,omitempty"` - Company *string `json:"company,omitempty"` - Country string `json:"country"` - CountryCode string `json:"country_code"` - DefaultCloud string `json:"default_cloud"` - EndOfLifeExtension *EndOfLifeExtensionOut `json:"end_of_life_extension,omitempty"` - EstimatedBalance string `json:"estimated_balance"` - EstimatedBalanceLocal *string `json:"estimated_balance_local,omitempty"` - Features map[string]any `json:"features,omitempty"` - OrganizationId string `json:"organization_id"` - PaymentMethod string `json:"payment_method"` - ProjectName string `json:"project_name"` - State *string `json:"state,omitempty"` - Tags map[string]string `json:"tags,omitempty"` - TechEmails []TechEmailOut `json:"tech_emails,omitempty"` - TenantId *string `json:"tenant_id,omitempty"` - TrialExpirationTime *time.Time `json:"trial_expiration_time,omitempty"` - VatId string `json:"vat_id"` - ZipCode *string `json:"zip_code,omitempty"` -} + AccountId string `json:"account_id"` // Account ID + AccountName *string `json:"account_name,omitempty"` // Account name + AddressLines []string `json:"address_lines,omitempty"` // Address lines + AvailableCredits *string `json:"available_credits,omitempty"` // Available credits, in USD + BillingAddress string `json:"billing_address"` // DEPRECATED: use split address fields like company, address_lines, zip_code, city and state instead + BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` // Billing currency + BillingEmails []BillingEmailOut `json:"billing_emails"` // List of project billing email addresses + BillingExtraText *string `json:"billing_extra_text,omitempty"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number + BillingGroupId string `json:"billing_group_id"` // Billing group ID + BillingGroupName string `json:"billing_group_name"` // Billing group name + CardInfo *CardInfoOut `json:"card_info,omitempty"` // Credit card assigned to the project + City *string `json:"city,omitempty"` // Address city + Company *string `json:"company,omitempty"` // Name of a company + Country string `json:"country"` // Billing country + CountryCode string `json:"country_code"` // Two letter ISO country code + DefaultCloud string `json:"default_cloud"` // Default cloud to use when launching services + EndOfLifeExtension *EndOfLifeExtensionOut `json:"end_of_life_extension,omitempty"` // End of life extension information + EstimatedBalance string `json:"estimated_balance"` // Estimated balance, in USD + EstimatedBalanceLocal *string `json:"estimated_balance_local,omitempty"` // Estimated balance, in billing currency + Features map[string]any `json:"features,omitempty"` // Feature flags + OrganizationId string `json:"organization_id"` // Organization ID + PaymentMethod string `json:"payment_method"` // Payment method + ProjectName string `json:"project_name"` // Project name + State *string `json:"state,omitempty"` // Address state + Tags map[string]string `json:"tags,omitempty"` // Set of resource tags + TechEmails []TechEmailOut `json:"tech_emails,omitempty"` // List of project tech email addresses + TenantId *string `json:"tenant_id,omitempty"` // Tenant ID + TrialExpirationTime *time.Time `json:"trial_expiration_time,omitempty"` // Trial expiration time (ISO 8601) + VatId string `json:"vat_id"` // EU VAT Identification Number + ZipCode *string `json:"zip_code,omitempty"` // Address zip code +} + +// ProjectUserListOut ProjectUserListResponse type ProjectUserListOut struct { - GroupUsers []GroupUserOut `json:"group_users"` - Invitations []InvitationOut `json:"invitations"` - Users []UserOut `json:"users"` + GroupUsers []GroupUserOut `json:"group_users"` // List of users in groups that have access to the project + Invitations []InvitationOut `json:"invitations"` // List of pending invitations + Users []UserOut `json:"users"` // List of project's users } + +// ProjectUserUpdateIn ProjectUserUpdateRequestBody type ProjectUserUpdateIn struct { - MemberType MemberType `json:"member_type"` + MemberType MemberType `json:"member_type"` // Project member type } type TechEmailIn struct { - Email string `json:"email"` + Email string `json:"email"` // User email address } type TechEmailOut struct { - Email string `json:"email"` + Email string `json:"email"` // User email address } type UserOut struct { - Auth []string `json:"auth"` - BillingContact bool `json:"billing_contact"` - CreateTime time.Time `json:"create_time"` - MemberType MemberType `json:"member_type"` - RealName *string `json:"real_name,omitempty"` - TeamId string `json:"team_id"` - TeamName string `json:"team_name"` - UserEmail string `json:"user_email"` + Auth []string `json:"auth"` // List of user's required authentication methods + BillingContact bool `json:"billing_contact"` // Set for project's billing contacts + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + MemberType MemberType `json:"member_type"` // Project member type + RealName *string `json:"real_name,omitempty"` // User real name + TeamId string `json:"team_id"` // Team ID + TeamName string `json:"team_name"` // Team name + UserEmail string `json:"user_email"` // User email address } type VpcPeeringConnectionType string @@ -670,40 +704,62 @@ func VpcPeeringConnectionTypeChoices() []string { } type VpcPeeringConnectionTypeOut struct { - CloudName string `json:"cloud_name"` - PriceUsd string `json:"price_usd"` - VpcPeeringConnectionType VpcPeeringConnectionType `json:"vpc_peering_connection_type"` + CloudName string `json:"cloud_name"` // Target cloud + PriceUsd string `json:"price_usd"` // Hourly peering connection price in this cloud region + VpcPeeringConnectionType VpcPeeringConnectionType `json:"vpc_peering_connection_type"` // Type of network connection from the VPC } + +// listProjectVpcPeeringConnectionTypesOut ListProjectVpcPeeringConnectionTypesResponse type listProjectVpcPeeringConnectionTypesOut struct { - VpcPeeringConnectionTypes []VpcPeeringConnectionTypeOut `json:"vpc_peering_connection_types"` + VpcPeeringConnectionTypes []VpcPeeringConnectionTypeOut `json:"vpc_peering_connection_types"` // Supported VPC peering connection types with pricing information for supported clouds } + +// projectAlertsListOut ProjectAlertsListResponse type projectAlertsListOut struct { - Alerts []AlertOut `json:"alerts"` + Alerts []AlertOut `json:"alerts"` // List of active alerts for the service } + +// projectCreateOut ProjectCreateResponse type projectCreateOut struct { - Project ProjectCreateOut `json:"project"` + Project ProjectCreateOut `json:"project"` // Project information } + +// projectGenerateSbomDownloadUrlOut ProjectGenerateSbomDownloadUrlResponse type projectGenerateSbomDownloadUrlOut struct { - DownloadUrl string `json:"download_url"` + DownloadUrl string `json:"download_url"` // Relative signed URL for report download } + +// projectGetEventLogsOut ProjectGetEventLogsResponse type projectGetEventLogsOut struct { - Events []EventOut `json:"events"` + Events []EventOut `json:"events"` // List of project event log entries } + +// projectGetOut ProjectGetResponse type projectGetOut struct { - Project ProjectGetOut `json:"project"` + Project ProjectGetOut `json:"project"` // Project information } + +// projectInviteAcceptOut ProjectInviteAcceptResponse type projectInviteAcceptOut struct { - InviteDetails ProjectInviteAcceptOut `json:"invite_details"` + InviteDetails ProjectInviteAcceptOut `json:"invite_details"` // Details of verified invite } + +// projectKmsGetCaOut ProjectKmsGetCAResponse type projectKmsGetCaOut struct { - Certificate string `json:"certificate"` + Certificate string `json:"certificate"` // PEM encoded certificate } + +// projectPrivatelinkAvailabilityListOut ProjectPrivatelinkAvailabilityListResponse type projectPrivatelinkAvailabilityListOut struct { - PrivatelinkAvailability []PrivatelinkAvailabilityOut `json:"privatelink_availability"` + PrivatelinkAvailability []PrivatelinkAvailabilityOut `json:"privatelink_availability"` // Privatelink pricing information for supported clouds } + +// projectTagsListOut ProjectTagsListResponse type projectTagsListOut struct { - Tags map[string]string `json:"tags,omitempty"` + Tags map[string]string `json:"tags,omitempty"` // Set of resource tags } + +// projectUpdateOut ProjectUpdateResponse type projectUpdateOut struct { - Project ProjectUpdateOut `json:"project"` + Project ProjectUpdateOut `json:"project"` // Project information } diff --git a/handler/projectbilling/projectbilling.go b/handler/projectbilling/projectbilling.go index c6cbdb4..248cb5f 100644 --- a/handler/projectbilling/projectbilling.go +++ b/handler/projectbilling/projectbilling.go @@ -109,12 +109,12 @@ func BillingGroupStateTypeChoices() []string { } type CreditOut struct { - Code *string `json:"code,omitempty"` - ExpireTime *time.Time `json:"expire_time,omitempty"` - RemainingValue *string `json:"remaining_value,omitempty"` - StartTime *time.Time `json:"start_time,omitempty"` - Type CreditType `json:"type,omitempty"` - Value *string `json:"value,omitempty"` + Code *string `json:"code,omitempty"` // Credit code + ExpireTime *time.Time `json:"expire_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC + RemainingValue *string `json:"remaining_value,omitempty"` // Remaining credit value + StartTime *time.Time `json:"start_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC + Type CreditType `json:"type,omitempty"` // Credit type + Value *string `json:"value,omitempty"` // Original credit value, or for expired credits, the consumed credit value } type CreditType string @@ -159,33 +159,34 @@ func CurrencyTypeChoices() []string { return []string{"AUD", "CAD", "CHF", "DKK", "EUR", "GBP", "JPY", "NOK", "NZD", "SEK", "SGD", "USD"} } +// InvoiceGetOut InvoiceModel type InvoiceGetOut struct { - BillingGroupId string `json:"billing_group_id"` - BillingGroupName string `json:"billing_group_name"` - BillingGroupState string `json:"billing_group_state"` + BillingGroupId string `json:"billing_group_id"` // Billing Group ID + BillingGroupName string `json:"billing_group_name"` // Billing Group Name + BillingGroupState string `json:"billing_group_state"` // Billing group state Currency string `json:"currency"` - DownloadCookie *string `json:"download_cookie,omitempty"` - GeneratedAt time.Time `json:"generated_at"` - InvoiceNumber string `json:"invoice_number"` - PeriodBegin string `json:"period_begin"` - PeriodEnd string `json:"period_end"` + DownloadCookie *string `json:"download_cookie,omitempty"` // Download Cookie + GeneratedAt time.Time `json:"generated_at"` // Generated At + InvoiceNumber string `json:"invoice_number"` // Invoice Number + PeriodBegin string `json:"period_begin"` // Period Begin + PeriodEnd string `json:"period_end"` // Period End State string `json:"state"` - TotalIncVat string `json:"total_inc_vat"` - TotalVatZero string `json:"total_vat_zero"` + TotalIncVat string `json:"total_inc_vat"` // Total Inc Vat + TotalVatZero string `json:"total_vat_zero"` // Total Vat Zero } type InvoiceOut struct { - BillingGroupId string `json:"billing_group_id"` - BillingGroupName string `json:"billing_group_name"` - BillingGroupState BillingGroupStateType `json:"billing_group_state"` - Currency CurrencyType `json:"currency"` - DownloadCookie string `json:"download_cookie"` - GeneratedAt *time.Time `json:"generated_at,omitempty"` - InvoiceNumber string `json:"invoice_number"` - PeriodBegin string `json:"period_begin"` - PeriodEnd string `json:"period_end"` - State InvoiceStateType `json:"state"` - TotalIncVat string `json:"total_inc_vat"` - TotalVatZero string `json:"total_vat_zero"` + BillingGroupId string `json:"billing_group_id"` // Billing group ID + BillingGroupName string `json:"billing_group_name"` // Billing group name + BillingGroupState BillingGroupStateType `json:"billing_group_state"` // Billing group state + Currency CurrencyType `json:"currency"` // Billing currency + DownloadCookie string `json:"download_cookie"` // Authentication cookie for downloads + GeneratedAt *time.Time `json:"generated_at,omitempty"` // The time when the invoice was generated + InvoiceNumber string `json:"invoice_number"` // Unique invoice reference code + PeriodBegin string `json:"period_begin"` // Period begin + PeriodEnd string `json:"period_end"` // Period end + State InvoiceStateType `json:"state"` // State of this invoice + TotalIncVat string `json:"total_inc_vat"` // Total including taxes + TotalVatZero string `json:"total_vat_zero"` // Total excluding taxes } type InvoiceStateType string @@ -210,26 +211,37 @@ func InvoiceStateTypeChoices() []string { return []string{"accrual", "consolidated", "due", "estimate", "failed_credit_card_charge", "failed_no_credit_card", "mailed", "no_payment_expected", "paid", "partner_metering", "uncollectible", "waived", "due_only_project_charges_calculated", "estimate_only_project_charges_calculated"} } +// ProjectCreditsClaimIn ProjectCreditsClaimRequestBody type ProjectCreditsClaimIn struct { - Code string `json:"code"` + Code string `json:"code"` // Credit code } + +// ProjectCreditsClaimOut Assigned credit type ProjectCreditsClaimOut struct { - Code *string `json:"code,omitempty"` - ExpireTime *time.Time `json:"expire_time,omitempty"` - RemainingValue *string `json:"remaining_value,omitempty"` - StartTime *time.Time `json:"start_time,omitempty"` - Type CreditType `json:"type,omitempty"` - Value *string `json:"value,omitempty"` + Code *string `json:"code,omitempty"` // Credit code + ExpireTime *time.Time `json:"expire_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC + RemainingValue *string `json:"remaining_value,omitempty"` // Remaining credit value + StartTime *time.Time `json:"start_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC + Type CreditType `json:"type,omitempty"` // Credit type + Value *string `json:"value,omitempty"` // Original credit value, or for expired credits, the consumed credit value } + +// invoiceGetOut InvoiceGetResponse type invoiceGetOut struct { - Invoice InvoiceGetOut `json:"invoice"` + Invoice InvoiceGetOut `json:"invoice"` // InvoiceModel } + +// projectCreditsClaimOut ProjectCreditsClaimResponse type projectCreditsClaimOut struct { - Credit ProjectCreditsClaimOut `json:"credit"` + Credit ProjectCreditsClaimOut `json:"credit"` // Assigned credit } + +// projectCreditsListOut ProjectCreditsListResponse type projectCreditsListOut struct { - Credits []CreditOut `json:"credits"` + Credits []CreditOut `json:"credits"` // List of credits assigned to a project } + +// projectInvoiceListOut ProjectInvoiceListResponse type projectInvoiceListOut struct { - Invoices []InvoiceOut `json:"invoices"` + Invoices []InvoiceOut `json:"invoices"` // List of project invoices } diff --git a/handler/service/service.go b/handler/service/service.go index 03ed728..ae24168 100644 --- a/handler/service/service.go +++ b/handler/service/service.go @@ -517,44 +517,55 @@ func (h *ServiceHandler) ServiceUpdate(ctx context.Context, project string, serv return &out.Service, nil } +/* +AccessControlOut Service specific access controls for user + +Service type specific access control rules for user. Currently only used for configuring user ACLs for Redis version 6 and above. +*/ type AccessControlOut struct { - DragonflyAclCategories []string `json:"dragonfly_acl_categories,omitempty"` - DragonflyAclCommands []string `json:"dragonfly_acl_commands,omitempty"` - DragonflyAclKeys []string `json:"dragonfly_acl_keys,omitempty"` - M3Group *string `json:"m3_group,omitempty"` - PgAllowReplication *bool `json:"pg_allow_replication,omitempty"` - RedisAclCategories []string `json:"redis_acl_categories,omitempty"` - RedisAclChannels []string `json:"redis_acl_channels,omitempty"` - RedisAclCommands []string `json:"redis_acl_commands,omitempty"` - RedisAclKeys []string `json:"redis_acl_keys,omitempty"` + DragonflyAclCategories []string `json:"dragonfly_acl_categories,omitempty"` // Command category rules + DragonflyAclCommands []string `json:"dragonfly_acl_commands,omitempty"` // Rules for individual commands + DragonflyAclKeys []string `json:"dragonfly_acl_keys,omitempty"` // Key access rules + M3Group *string `json:"m3_group,omitempty"` // M3 access group to associate users with + PgAllowReplication *bool `json:"pg_allow_replication,omitempty"` // Enable REPLICATION role option + RedisAclCategories []string `json:"redis_acl_categories,omitempty"` // Command category rules + RedisAclChannels []string `json:"redis_acl_channels,omitempty"` /* + Permitted pub/sub channel patterns + + Glob-style patterns defining which pub/sub channels can be accessed. If array is not defined, the default policy is used (allchannels). + */ + RedisAclCommands []string `json:"redis_acl_commands,omitempty"` // Rules for individual commands + RedisAclKeys []string `json:"redis_acl_keys,omitempty"` // Key access rules } type AclOut struct { - Id *string `json:"id,omitempty"` - Permission PermissionType `json:"permission"` - Topic string `json:"topic"` + Id *string `json:"id,omitempty"` // ID + Permission PermissionType `json:"permission"` // Kafka permission + Topic string `json:"topic"` // Topic name pattern Username string `json:"username"` } type AdditionalRegionOut struct { - Cloud string `json:"cloud"` - PauseReason *string `json:"pause_reason,omitempty"` - Paused *bool `json:"paused,omitempty"` - Region *string `json:"region,omitempty"` + Cloud string `json:"cloud"` // Target cloud + PauseReason *string `json:"pause_reason,omitempty"` // Reason for pausing the backup synchronization + Paused *bool `json:"paused,omitempty"` // Indicates additional backup synchronization is paused + Region *string `json:"region,omitempty"` // Cloud storage region name } + +// AggregatorOut Service type information type AggregatorOut struct { - DefaultVersion *string `json:"default_version,omitempty"` - Description string `json:"description"` - LatestAvailableVersion *string `json:"latest_available_version,omitempty"` - ServicePlans []ServicePlanOut `json:"service_plans"` - UserConfigSchema map[string]any `json:"user_config_schema"` + DefaultVersion *string `json:"default_version,omitempty"` // Default version of the service if no explicit version is defined + Description string `json:"description"` // Single line description of the service + LatestAvailableVersion *string `json:"latest_available_version,omitempty"` // Latest available version of the service + ServicePlans []ServicePlanOut `json:"service_plans"` // List of plans available for this type of service + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } type AlertOut struct { - CreateTime time.Time `json:"create_time"` - Event string `json:"event"` - NodeName *string `json:"node_name,omitempty"` - ProjectName string `json:"project_name"` - ServiceName *string `json:"service_name,omitempty"` - ServiceType *string `json:"service_type,omitempty"` - Severity string `json:"severity"` + CreateTime time.Time `json:"create_time"` // Event creation timestamp (ISO 8601) + Event string `json:"event"` // Name of the alerting event + NodeName *string `json:"node_name,omitempty"` // Name of the service node + ProjectName string `json:"project_name"` // Project name + ServiceName *string `json:"service_name,omitempty"` // Service name + ServiceType *string `json:"service_type,omitempty"` // Service type code + Severity string `json:"severity"` // Severity of the event } type AuthenticationType string @@ -568,61 +579,68 @@ func AuthenticationTypeChoices() []string { return []string{"null", "caching_sha2_password", "mysql_native_password"} } +// BackupConfigOut Backup configuration for this service plan type BackupConfigOut struct { - FrequentIntervalMinutes *int `json:"frequent_interval_minutes,omitempty"` - FrequentOldestAgeMinutes *int `json:"frequent_oldest_age_minutes,omitempty"` - InfrequentIntervalMinutes *int `json:"infrequent_interval_minutes,omitempty"` - InfrequentOldestAgeMinutes *int `json:"infrequent_oldest_age_minutes,omitempty"` - Interval int `json:"interval"` - MaxCount int `json:"max_count"` - RecoveryMode RecoveryModeType `json:"recovery_mode"` + FrequentIntervalMinutes *int `json:"frequent_interval_minutes,omitempty"` // Interval of taking a frequent backup in service types supporting different backup schedules + FrequentOldestAgeMinutes *int `json:"frequent_oldest_age_minutes,omitempty"` // Maximum age of the oldest frequent backup in service types supporting different backup schedules + InfrequentIntervalMinutes *int `json:"infrequent_interval_minutes,omitempty"` // Interval of taking an infrequent backup in service types supporting different backup schedules + InfrequentOldestAgeMinutes *int `json:"infrequent_oldest_age_minutes,omitempty"` // Maximum age of the oldest infrequent backup in service types supporting different backup schedules + Interval int `json:"interval"` // The interval, in hours, at which backups are generated. For some services, like PostgreSQL, this is the interval at which full snapshots are taken and continuous incremental backup stream is maintained in addition to that. + MaxCount int `json:"max_count"` // Maximum number of backups to keep. Zero when no backups are created. + RecoveryMode RecoveryModeType `json:"recovery_mode"` // Mechanism how backups can be restored. 'basic' means a backup is restored as is so that the system is restored to the state it was when the backup was generated. 'pitr' means point-in-time-recovery, which allows restoring the system to any state since the first available full snapshot. } type BackupOut struct { - AdditionalRegions []AdditionalRegionOut `json:"additional_regions,omitempty"` - BackupName string `json:"backup_name"` - BackupTime time.Time `json:"backup_time"` - DataSize int `json:"data_size"` - StorageLocation *string `json:"storage_location,omitempty"` + AdditionalRegions []AdditionalRegionOut `json:"additional_regions,omitempty"` // Additional backup regions, if available + BackupName string `json:"backup_name"` // Internal name of this backup + BackupTime time.Time `json:"backup_time"` // Backup timestamp (ISO 8601) + DataSize int `json:"data_size"` // Backup's original size before compression + StorageLocation *string `json:"storage_location,omitempty"` // Location where this backup is stored } + +// CassandraOut Service type information type CassandraOut struct { - DefaultVersion *string `json:"default_version,omitempty"` - Description string `json:"description"` - LatestAvailableVersion *string `json:"latest_available_version,omitempty"` - ServicePlans []ServicePlanOut `json:"service_plans"` - UserConfigSchema map[string]any `json:"user_config_schema"` + DefaultVersion *string `json:"default_version,omitempty"` // Default version of the service if no explicit version is defined + Description string `json:"description"` // Single line description of the service + LatestAvailableVersion *string `json:"latest_available_version,omitempty"` // Latest available version of the service + ServicePlans []ServicePlanOut `json:"service_plans"` // List of plans available for this type of service + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } + +// ClickhouseOut Service type information type ClickhouseOut struct { - DefaultVersion *string `json:"default_version,omitempty"` - Description string `json:"description"` - LatestAvailableVersion *string `json:"latest_available_version,omitempty"` - ServicePlans []ServicePlanOut `json:"service_plans"` - UserConfigSchema map[string]any `json:"user_config_schema"` + DefaultVersion *string `json:"default_version,omitempty"` // Default version of the service if no explicit version is defined + Description string `json:"description"` // Single line description of the service + LatestAvailableVersion *string `json:"latest_available_version,omitempty"` // Latest available version of the service + ServicePlans []ServicePlanOut `json:"service_plans"` // List of plans available for this type of service + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } type ComponentOut struct { - Component string `json:"component"` - Host string `json:"host"` - KafkaAuthenticationMethod KafkaAuthenticationMethodType `json:"kafka_authentication_method,omitempty"` - KafkaSslCa KafkaSslCaType `json:"kafka_ssl_ca,omitempty"` - Path *string `json:"path,omitempty"` - Port int `json:"port"` - PrivatelinkConnectionId *string `json:"privatelink_connection_id,omitempty"` - Route RouteType `json:"route"` - Ssl *bool `json:"ssl,omitempty"` - Usage UsageType `json:"usage"` + Component string `json:"component"` // Service component name + Host string `json:"host"` // DNS name for connecting to the service component + KafkaAuthenticationMethod KafkaAuthenticationMethodType `json:"kafka_authentication_method,omitempty"` // Kafka authentication method. This is a value specific to the 'kafka' service component + KafkaSslCa KafkaSslCaType `json:"kafka_ssl_ca,omitempty"` // Specifies if this port uses Project CA or Letsencrypt. If not specified, the default is using Project CA.This is a value specific to the 'kafka' service component. + Path *string `json:"path,omitempty"` // Path component of the service URL (useful only if service component is HTTP or HTTPS endpoint) + Port int `json:"port"` // Port number for connecting to the service component + PrivatelinkConnectionId *string `json:"privatelink_connection_id,omitempty"` // Privatelink connection ID + Route RouteType `json:"route"` // Network access route + Ssl *bool `json:"ssl,omitempty"` // Whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted andthis property is only included for service components that may disable encryption. + Usage UsageType `json:"usage"` // DNS usage name } type ConnectionPoolOut struct { - ConnectionUri string `json:"connection_uri"` - Database string `json:"database"` - PoolMode PoolModeType `json:"pool_mode"` - PoolName string `json:"pool_name"` - PoolSize int `json:"pool_size"` - Username *string `json:"username,omitempty"` + ConnectionUri string `json:"connection_uri"` // Connection URI for the DB pool + Database string `json:"database"` // Database name + PoolMode PoolModeType `json:"pool_mode"` // PGBouncer pool mode + PoolName string `json:"pool_name"` // Connection pool name + PoolSize int `json:"pool_size"` // Size of PGBouncer's PostgreSQL side connection pool + Username *string `json:"username,omitempty"` // Pool username } type DatabaseOut struct { - DatabaseName string `json:"database_name"` + DatabaseName string `json:"database_name"` // Database name or ID } + +// DatasetImportIn Payload to be used with dataset_import type DatasetImportIn struct { - DatasetName DatasetNameType `json:"dataset_name"` + DatasetName DatasetNameType `json:"dataset_name"` // Name of the dataset to import to PostgreSQL database. Used with dataset_import. } type DatasetNameType string @@ -634,12 +652,13 @@ func DatasetNameTypeChoices() []string { return []string{"pagila"} } +// DbOut Service type information type DbOut struct { - DefaultVersion *string `json:"default_version,omitempty"` - Description string `json:"description"` - LatestAvailableVersion *string `json:"latest_available_version,omitempty"` - ServicePlans []ServicePlanOut `json:"service_plans"` - UserConfigSchema map[string]any `json:"user_config_schema"` + DefaultVersion *string `json:"default_version,omitempty"` // Default version of the service if no explicit version is defined + Description string `json:"description"` // Single line description of the service + LatestAvailableVersion *string `json:"latest_available_version,omitempty"` // Latest available version of the service + ServicePlans []ServicePlanOut `json:"service_plans"` // List of plans available for this type of service + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } type DowType string @@ -674,44 +693,55 @@ func DowTypeAltChoices() []string { return []string{"monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday", "never"} } +// DragonflyOut Service type information type DragonflyOut struct { - DefaultVersion *string `json:"default_version,omitempty"` - Description string `json:"description"` - LatestAvailableVersion *string `json:"latest_available_version,omitempty"` - ServicePlans []ServicePlanOut `json:"service_plans"` - UserConfigSchema map[string]any `json:"user_config_schema"` + DefaultVersion *string `json:"default_version,omitempty"` // Default version of the service if no explicit version is defined + Description string `json:"description"` // Single line description of the service + LatestAvailableVersion *string `json:"latest_available_version,omitempty"` // Latest available version of the service + ServicePlans []ServicePlanOut `json:"service_plans"` // List of plans available for this type of service + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } + +// ElasticsearchOut Service type information type ElasticsearchOut struct { - DefaultVersion *string `json:"default_version,omitempty"` - Description string `json:"description"` - LatestAvailableVersion *string `json:"latest_available_version,omitempty"` - ServicePlans []ServicePlanOut `json:"service_plans"` - UserConfigSchema map[string]any `json:"user_config_schema"` + DefaultVersion *string `json:"default_version,omitempty"` // Default version of the service if no explicit version is defined + Description string `json:"description"` // Single line description of the service + LatestAvailableVersion *string `json:"latest_available_version,omitempty"` // Latest available version of the service + ServicePlans []ServicePlanOut `json:"service_plans"` // List of plans available for this type of service + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } + +// FlinkOut Service type information type FlinkOut struct { - DefaultVersion *string `json:"default_version,omitempty"` - Description string `json:"description"` - LatestAvailableVersion *string `json:"latest_available_version,omitempty"` - ServicePlans []ServicePlanOut `json:"service_plans"` - UserConfigSchema map[string]any `json:"user_config_schema"` + DefaultVersion *string `json:"default_version,omitempty"` // Default version of the service if no explicit version is defined + Description string `json:"description"` // Single line description of the service + LatestAvailableVersion *string `json:"latest_available_version,omitempty"` // Latest available version of the service + ServicePlans []ServicePlanOut `json:"service_plans"` // List of plans available for this type of service + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } + +// GrafanaOut Service type information type GrafanaOut struct { - DefaultVersion *string `json:"default_version,omitempty"` - Description string `json:"description"` - LatestAvailableVersion *string `json:"latest_available_version,omitempty"` - ServicePlans []ServicePlanOut `json:"service_plans"` - UserConfigSchema map[string]any `json:"user_config_schema"` + DefaultVersion *string `json:"default_version,omitempty"` // Default version of the service if no explicit version is defined + Description string `json:"description"` // Single line description of the service + LatestAvailableVersion *string `json:"latest_available_version,omitempty"` // Latest available version of the service + ServicePlans []ServicePlanOut `json:"service_plans"` // List of plans available for this type of service + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } + +// InfluxdbOut Service type information type InfluxdbOut struct { - DefaultVersion *string `json:"default_version,omitempty"` - Description string `json:"description"` - LatestAvailableVersion *string `json:"latest_available_version,omitempty"` - ServicePlans []ServicePlanOut `json:"service_plans"` - UserConfigSchema map[string]any `json:"user_config_schema"` + DefaultVersion *string `json:"default_version,omitempty"` // Default version of the service if no explicit version is defined + Description string `json:"description"` // Single line description of the service + LatestAvailableVersion *string `json:"latest_available_version,omitempty"` // Latest available version of the service + ServicePlans []ServicePlanOut `json:"service_plans"` // List of plans available for this type of service + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } + +// IntegrationStatusOut Integration status type IntegrationStatusOut struct { - State StateOut `json:"state"` - StatusUserDesc string `json:"status_user_desc"` + State StateOut `json:"state"` // Service integration state + StatusUserDesc string `json:"status_user_desc"` // Integration status description } type IntegrationStatusType string @@ -789,26 +819,31 @@ func KafkaAuthenticationMethodTypeChoices() []string { return []string{"certificate", "sasl"} } +// KafkaConnectOut Service type information type KafkaConnectOut struct { - DefaultVersion *string `json:"default_version,omitempty"` - Description string `json:"description"` - LatestAvailableVersion *string `json:"latest_available_version,omitempty"` - ServicePlans []ServicePlanOut `json:"service_plans"` - UserConfigSchema map[string]any `json:"user_config_schema"` + DefaultVersion *string `json:"default_version,omitempty"` // Default version of the service if no explicit version is defined + Description string `json:"description"` // Single line description of the service + LatestAvailableVersion *string `json:"latest_available_version,omitempty"` // Latest available version of the service + ServicePlans []ServicePlanOut `json:"service_plans"` // List of plans available for this type of service + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } + +// KafkaMirrormakerOut Service type information type KafkaMirrormakerOut struct { - DefaultVersion *string `json:"default_version,omitempty"` - Description string `json:"description"` - LatestAvailableVersion *string `json:"latest_available_version,omitempty"` - ServicePlans []ServicePlanOut `json:"service_plans"` - UserConfigSchema map[string]any `json:"user_config_schema"` + DefaultVersion *string `json:"default_version,omitempty"` // Default version of the service if no explicit version is defined + Description string `json:"description"` // Single line description of the service + LatestAvailableVersion *string `json:"latest_available_version,omitempty"` // Latest available version of the service + ServicePlans []ServicePlanOut `json:"service_plans"` // List of plans available for this type of service + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } + +// KafkaOut Service type information type KafkaOut struct { - DefaultVersion *string `json:"default_version,omitempty"` - Description string `json:"description"` - LatestAvailableVersion *string `json:"latest_available_version,omitempty"` - ServicePlans []ServicePlanOut `json:"service_plans"` - UserConfigSchema map[string]any `json:"user_config_schema"` + DefaultVersion *string `json:"default_version,omitempty"` // Default version of the service if no explicit version is defined + Description string `json:"description"` // Single line description of the service + LatestAvailableVersion *string `json:"latest_available_version,omitempty"` // Latest available version of the service + ServicePlans []ServicePlanOut `json:"service_plans"` // List of plans available for this type of service + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } type KafkaSslCaType string @@ -846,55 +881,62 @@ func LikelyErrorCauseTypeChoices() []string { return []string{"null", "destination", "integration", "source", "unknown"} } +// ListProjectServiceTypesOut Service plans by service type type ListProjectServiceTypesOut struct { - Cassandra *CassandraOut `json:"cassandra,omitempty"` - Clickhouse *ClickhouseOut `json:"clickhouse,omitempty"` - Dragonfly *DragonflyOut `json:"dragonfly,omitempty"` - Elasticsearch *ElasticsearchOut `json:"elasticsearch,omitempty"` - Flink *FlinkOut `json:"flink,omitempty"` - Grafana *GrafanaOut `json:"grafana,omitempty"` - Influxdb *InfluxdbOut `json:"influxdb,omitempty"` - Kafka *KafkaOut `json:"kafka,omitempty"` - KafkaConnect *KafkaConnectOut `json:"kafka_connect,omitempty"` - KafkaMirrormaker *KafkaMirrormakerOut `json:"kafka_mirrormaker,omitempty"` - M3Aggregator *AggregatorOut `json:"m3aggregator,omitempty"` - M3Db *DbOut `json:"m3db,omitempty"` - Mysql *MysqlOut `json:"mysql,omitempty"` - Opensearch *OpensearchOut `json:"opensearch,omitempty"` - Pg *PgOut `json:"pg,omitempty"` - Redis *RedisOut `json:"redis,omitempty"` -} + Cassandra *CassandraOut `json:"cassandra,omitempty"` // Service type information + Clickhouse *ClickhouseOut `json:"clickhouse,omitempty"` // Service type information + Dragonfly *DragonflyOut `json:"dragonfly,omitempty"` // Service type information + Elasticsearch *ElasticsearchOut `json:"elasticsearch,omitempty"` // Service type information + Flink *FlinkOut `json:"flink,omitempty"` // Service type information + Grafana *GrafanaOut `json:"grafana,omitempty"` // Service type information + Influxdb *InfluxdbOut `json:"influxdb,omitempty"` // Service type information + Kafka *KafkaOut `json:"kafka,omitempty"` // Service type information + KafkaConnect *KafkaConnectOut `json:"kafka_connect,omitempty"` // Service type information + KafkaMirrormaker *KafkaMirrormakerOut `json:"kafka_mirrormaker,omitempty"` // Service type information + M3Aggregator *AggregatorOut `json:"m3aggregator,omitempty"` // Service type information + M3Db *DbOut `json:"m3db,omitempty"` // Service type information + Mysql *MysqlOut `json:"mysql,omitempty"` // Service type information + Opensearch *OpensearchOut `json:"opensearch,omitempty"` // Service type information + Pg *PgOut `json:"pg,omitempty"` // Service type information + Redis *RedisOut `json:"redis,omitempty"` // Service type information +} + +// ListPublicServiceTypesOut Service plans by service type type ListPublicServiceTypesOut struct { - Cassandra *CassandraOut `json:"cassandra,omitempty"` - Clickhouse *ClickhouseOut `json:"clickhouse,omitempty"` - Dragonfly *DragonflyOut `json:"dragonfly,omitempty"` - Elasticsearch *ElasticsearchOut `json:"elasticsearch,omitempty"` - Flink *FlinkOut `json:"flink,omitempty"` - Grafana *GrafanaOut `json:"grafana,omitempty"` - Influxdb *InfluxdbOut `json:"influxdb,omitempty"` - Kafka *KafkaOut `json:"kafka,omitempty"` - KafkaConnect *KafkaConnectOut `json:"kafka_connect,omitempty"` - KafkaMirrormaker *KafkaMirrormakerOut `json:"kafka_mirrormaker,omitempty"` - M3Aggregator *AggregatorOut `json:"m3aggregator,omitempty"` - M3Db *DbOut `json:"m3db,omitempty"` - Mysql *MysqlOut `json:"mysql,omitempty"` - Opensearch *OpensearchOut `json:"opensearch,omitempty"` - Pg *PgOut `json:"pg,omitempty"` - Redis *RedisOut `json:"redis,omitempty"` + Cassandra *CassandraOut `json:"cassandra,omitempty"` // Service type information + Clickhouse *ClickhouseOut `json:"clickhouse,omitempty"` // Service type information + Dragonfly *DragonflyOut `json:"dragonfly,omitempty"` // Service type information + Elasticsearch *ElasticsearchOut `json:"elasticsearch,omitempty"` // Service type information + Flink *FlinkOut `json:"flink,omitempty"` // Service type information + Grafana *GrafanaOut `json:"grafana,omitempty"` // Service type information + Influxdb *InfluxdbOut `json:"influxdb,omitempty"` // Service type information + Kafka *KafkaOut `json:"kafka,omitempty"` // Service type information + KafkaConnect *KafkaConnectOut `json:"kafka_connect,omitempty"` // Service type information + KafkaMirrormaker *KafkaMirrormakerOut `json:"kafka_mirrormaker,omitempty"` // Service type information + M3Aggregator *AggregatorOut `json:"m3aggregator,omitempty"` // Service type information + M3Db *DbOut `json:"m3db,omitempty"` // Service type information + Mysql *MysqlOut `json:"mysql,omitempty"` // Service type information + Opensearch *OpensearchOut `json:"opensearch,omitempty"` // Service type information + Pg *PgOut `json:"pg,omitempty"` // Service type information + Redis *RedisOut `json:"redis,omitempty"` // Service type information } type LogOut struct { - Msg string `json:"msg"` - Time *string `json:"time,omitempty"` - Unit *string `json:"unit,omitempty"` + Msg string `json:"msg"` // Log message + Time *string `json:"time,omitempty"` // Timestamp in ISO 8601 format, always in UTC + Unit *string `json:"unit,omitempty"` // SystemD unit name } + +// MaintenanceIn Automatic maintenance settings type MaintenanceIn struct { - Dow DowType `json:"dow,omitempty"` - Time *string `json:"time,omitempty"` + Dow DowType `json:"dow,omitempty"` // Day of week for installing updates + Time *string `json:"time,omitempty"` // Time for installing updates, UTC } + +// MaintenanceOut Automatic maintenance settings type MaintenanceOut struct { - Dow DowTypeAlt `json:"dow"` - Time string `json:"time"` - Updates []UpdateOut `json:"updates"` + Dow DowTypeAlt `json:"dow"` // Day of week for installing updates + Time string `json:"time"` // Time for installing updates, UTC + Updates []UpdateOut `json:"updates"` // List of updates waiting to be installed } type MasterLinkStatusType string @@ -907,12 +949,13 @@ func MasterLinkStatusTypeChoices() []string { return []string{"up", "down"} } +// MetadataOut Notification metadata type MetadataOut struct { - EndOfLifeHelpArticleUrl *string `json:"end_of_life_help_article_url,omitempty"` - EndOfLifePolicyUrl *string `json:"end_of_life_policy_url,omitempty"` - ServiceEndOfLifeTime *time.Time `json:"service_end_of_life_time,omitempty"` - UpgradeToServiceType *string `json:"upgrade_to_service_type,omitempty"` - UpgradeToVersion *string `json:"upgrade_to_version,omitempty"` + EndOfLifeHelpArticleUrl *string `json:"end_of_life_help_article_url,omitempty"` // Link to the help article + EndOfLifePolicyUrl *string `json:"end_of_life_policy_url,omitempty"` // Link to the help article + ServiceEndOfLifeTime *time.Time `json:"service_end_of_life_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC + UpgradeToServiceType *string `json:"upgrade_to_service_type,omitempty"` // If the customer takes no action, the service is updated to this service type when end of life is reached on the Aiven platform. If it is the same as the service type, the platform only upgrades the version. + UpgradeToVersion *string `json:"upgrade_to_version,omitempty"` // The version to which the service will be updated at the end of life on the Aiven platform if the user does not take any action } type MethodType string @@ -939,18 +982,19 @@ func MethodTypeAltChoices() []string { return []string{"dump", "replication"} } +// MigrationCheckIn Payload to be used with migration_check type MigrationCheckIn struct { - IgnoreDbs *string `json:"ignore_dbs,omitempty"` - Method MethodTypeAlt `json:"method,omitempty"` - SourceProjectName *string `json:"source_project_name,omitempty"` - SourceServiceName *string `json:"source_service_name,omitempty"` - SourceServiceUri *string `json:"source_service_uri,omitempty"` + IgnoreDbs *string `json:"ignore_dbs,omitempty"` // Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment) + Method MethodTypeAlt `json:"method,omitempty"` // The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types) + SourceProjectName *string `json:"source_project_name,omitempty"` // Project name + SourceServiceName *string `json:"source_service_name,omitempty"` // Service name + SourceServiceUri *string `json:"source_service_uri,omitempty"` // Service URI of the source MySQL or PostgreSQL database with admin credentials. Used with migration_check. } type MigrationDetailOut struct { - Dbname string `json:"dbname"` - Error *string `json:"error,omitempty"` - Method MethodType `json:"method"` - Status MigrationDetailStatusType `json:"status"` + Dbname string `json:"dbname"` // Migrated db name (PG, MySQL) or number (Redis, Dragonfly) + Error *string `json:"error,omitempty"` // Error message in case that migration has failed + Method MethodType `json:"method"` // The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types) + Status MigrationDetailStatusType `json:"status"` // Migration status } type MigrationDetailStatusType string @@ -965,12 +1009,13 @@ func MigrationDetailStatusTypeChoices() []string { return []string{"done", "failed", "running", "syncing"} } +// MigrationOut Service migration info type MigrationOut struct { - Error *string `json:"error,omitempty"` - MasterLastIoSecondsAgo *int `json:"master_last_io_seconds_ago,omitempty"` - MasterLinkStatus MasterLinkStatusType `json:"master_link_status,omitempty"` - Method MethodType `json:"method"` - Status MigrationStatusType `json:"status"` + Error *string `json:"error,omitempty"` // Error message in case that migration has failed + MasterLastIoSecondsAgo *int `json:"master_last_io_seconds_ago,omitempty"` // Redis only: how many seconds since last I/O with redis master + MasterLinkStatus MasterLinkStatusType `json:"master_link_status,omitempty"` // Redis only: replication master link status + Method MethodType `json:"method"` // The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types) + Status MigrationStatusType `json:"status"` // Migration status } type MigrationStatusType string @@ -985,19 +1030,20 @@ func MigrationStatusTypeChoices() []string { return []string{"done", "failed", "running", "syncing"} } +// MysqlOut Service type information type MysqlOut struct { - DefaultVersion *string `json:"default_version,omitempty"` - Description string `json:"description"` - LatestAvailableVersion *string `json:"latest_available_version,omitempty"` - ServicePlans []ServicePlanOut `json:"service_plans"` - UserConfigSchema map[string]any `json:"user_config_schema"` + DefaultVersion *string `json:"default_version,omitempty"` // Default version of the service if no explicit version is defined + Description string `json:"description"` // Single line description of the service + LatestAvailableVersion *string `json:"latest_available_version,omitempty"` // Latest available version of the service + ServicePlans []ServicePlanOut `json:"service_plans"` // List of plans available for this type of service + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } type NodeStateOut struct { - Name string `json:"name"` - ProgressUpdates []ProgressUpdateOut `json:"progress_updates,omitempty"` - Role RoleType `json:"role,omitempty"` - Shard *ShardOut `json:"shard,omitempty"` - State NodeStateType `json:"state"` + Name string `json:"name"` // Name of the service node + ProgressUpdates []ProgressUpdateOut `json:"progress_updates,omitempty"` // Extra information regarding the progress for current state + Role RoleType `json:"role,omitempty"` // Role of this node. Only returned for a subset of service types + Shard *ShardOut `json:"shard,omitempty"` // Shard of this node. Only returned for a subset of service types + State NodeStateType `json:"state"` // Current state of the service node } type NodeStateType string @@ -1014,12 +1060,13 @@ func NodeStateTypeChoices() []string { return []string{"leaving", "running", "setting_up_vm", "syncing_data", "timing_out", "unknown"} } +// OpensearchOut Service type information type OpensearchOut struct { - DefaultVersion *string `json:"default_version,omitempty"` - Description string `json:"description"` - LatestAvailableVersion *string `json:"latest_available_version,omitempty"` - ServicePlans []ServicePlanOut `json:"service_plans"` - UserConfigSchema map[string]any `json:"user_config_schema"` + DefaultVersion *string `json:"default_version,omitempty"` // Default version of the service if no explicit version is defined + Description string `json:"description"` // Single line description of the service + LatestAvailableVersion *string `json:"latest_available_version,omitempty"` // Latest available version of the service + ServicePlans []ServicePlanOut `json:"service_plans"` // List of plans available for this type of service + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } type PeriodType string @@ -1059,12 +1106,13 @@ func PermissionTypeAltChoices() []string { return []string{"schema_registry_read", "schema_registry_write"} } +// PgOut Service type information type PgOut struct { - DefaultVersion *string `json:"default_version,omitempty"` - Description string `json:"description"` - LatestAvailableVersion *string `json:"latest_available_version,omitempty"` - ServicePlans []ServicePlanOut `json:"service_plans"` - UserConfigSchema map[string]any `json:"user_config_schema"` + DefaultVersion *string `json:"default_version,omitempty"` // Default version of the service if no explicit version is defined + Description string `json:"description"` // Single line description of the service + LatestAvailableVersion *string `json:"latest_available_version,omitempty"` // Latest available version of the service + ServicePlans []ServicePlanOut `json:"service_plans"` // List of plans available for this type of service + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } type PhaseType string @@ -1092,69 +1140,77 @@ func PoolModeTypeChoices() []string { } type ProgressUpdateOut struct { - Completed bool `json:"completed"` - Current *int `json:"current,omitempty"` - Max *int `json:"max,omitempty"` - Min *int `json:"min,omitempty"` - Phase PhaseType `json:"phase"` - Unit UnitType `json:"unit,omitempty"` + Completed bool `json:"completed"` // Indicates whether this phase has been completed or not + Current *int `json:"current,omitempty"` // Current progress for this phase. May be missing or null. + Max *int `json:"max,omitempty"` // Maximum progress value for this phase. May be missing or null. May change. + Min *int `json:"min,omitempty"` // Minimum progress value for this phase. May be missing or null. + Phase PhaseType `json:"phase"` // Key identifying this phase + Unit UnitType `json:"unit,omitempty"` // Unit for current/min/max values. New units may be added. If null should be treated as generic unit } + +// ProjectGetServiceLogsIn ProjectGetServiceLogsRequestBody type ProjectGetServiceLogsIn struct { - Limit *int `json:"limit,omitempty"` - Offset *string `json:"offset,omitempty"` - SortOrder SortOrderType `json:"sort_order,omitempty"` + Limit *int `json:"limit,omitempty"` // How many log entries to receive at most + Offset *string `json:"offset,omitempty"` // Opaque offset identifier + SortOrder SortOrderType `json:"sort_order,omitempty"` // Sort order for log messages } + +// ProjectGetServiceLogsOut ProjectGetServiceLogsResponse type ProjectGetServiceLogsOut struct { - FirstLogOffset string `json:"first_log_offset"` - Logs []LogOut `json:"logs"` - Offset string `json:"offset"` + FirstLogOffset string `json:"first_log_offset"` // Opaque offset identifier of the first received log message. A null value is returned when there are no logs at all. + Logs []LogOut `json:"logs"` // List of log entries + Offset string `json:"offset"` // Opaque offset identifier. A null value is returned when there are no logs at all. } + +// ProjectServiceTagsReplaceIn ProjectServiceTagsReplaceRequestBody type ProjectServiceTagsReplaceIn struct { - Tags map[string]string `json:"tags"` + Tags map[string]string `json:"tags"` // Set of resource tags } + +// ProjectServiceTagsUpdateIn ProjectServiceTagsUpdateRequestBody type ProjectServiceTagsUpdateIn struct { - Tags map[string]string `json:"tags"` + Tags map[string]string `json:"tags"` // Set of resource tags } type QueryOut struct { - ActiveChannelSubscriptions *int `json:"active_channel_subscriptions,omitempty"` - ActiveDatabase *string `json:"active_database,omitempty"` - ActivePatternMatchingChannelSubscriptions *int `json:"active_pattern_matching_channel_subscriptions,omitempty"` - ApplicationName *string `json:"application_name,omitempty"` - BackendStart *string `json:"backend_start,omitempty"` - BackendType *string `json:"backend_type,omitempty"` - BackendXid *int `json:"backend_xid,omitempty"` - BackendXmin *int `json:"backend_xmin,omitempty"` - ClientAddr *string `json:"client_addr,omitempty"` - ClientHostname *string `json:"client_hostname,omitempty"` - ClientPort *int `json:"client_port,omitempty"` - ConnectionAgeSeconds *float64 `json:"connection_age_seconds,omitempty"` - ConnectionIdleSeconds *float64 `json:"connection_idle_seconds,omitempty"` - Datid *int `json:"datid,omitempty"` - Datname *string `json:"datname,omitempty"` - Flags []string `json:"flags,omitempty"` - FlagsRaw *string `json:"flags_raw,omitempty"` - Id *string `json:"id,omitempty"` - LeaderPid *int `json:"leader_pid,omitempty"` - MultiExecCommands *int `json:"multi_exec_commands,omitempty"` - Name *string `json:"name,omitempty"` - OutputBuffer *int `json:"output_buffer,omitempty"` - OutputBufferMemory *int `json:"output_buffer_memory,omitempty"` - OutputListLength *int `json:"output_list_length,omitempty"` - Pid *int `json:"pid,omitempty"` - Query *string `json:"query,omitempty"` - QueryBuffer *int `json:"query_buffer,omitempty"` - QueryBufferFree *int `json:"query_buffer_free,omitempty"` - QueryDuration *float64 `json:"query_duration,omitempty"` - QueryId *int `json:"query_id,omitempty"` - QueryStart *string `json:"query_start,omitempty"` - State *string `json:"state,omitempty"` - StateChange *string `json:"state_change,omitempty"` - Usename *string `json:"usename,omitempty"` - Usesysid *int `json:"usesysid,omitempty"` - WaitEvent *string `json:"wait_event,omitempty"` - WaitEventType *string `json:"wait_event_type,omitempty"` - Waiting *bool `json:"waiting,omitempty"` - XactStart *string `json:"xact_start,omitempty"` + ActiveChannelSubscriptions *int `json:"active_channel_subscriptions,omitempty"` // Currently active channel subscriptions + ActiveDatabase *string `json:"active_database,omitempty"` // Selected database + ActivePatternMatchingChannelSubscriptions *int `json:"active_pattern_matching_channel_subscriptions,omitempty"` // Currently active channel subscriptions using pattern matching + ApplicationName *string `json:"application_name,omitempty"` // Application name when set + BackendStart *string `json:"backend_start,omitempty"` // Timestamp in ISO 8601 format, always in UTC + BackendType *string `json:"backend_type,omitempty"` // Backend type + BackendXid *int `json:"backend_xid,omitempty"` // XID for current backend + BackendXmin *int `json:"backend_xmin,omitempty"` // xmin for current backend + ClientAddr *string `json:"client_addr,omitempty"` // IP address:port pair. Not always available due to load balancers + ClientHostname *string `json:"client_hostname,omitempty"` // Client hostname + ClientPort *int `json:"client_port,omitempty"` // Client port, -1 is unknown + ConnectionAgeSeconds *float64 `json:"connection_age_seconds,omitempty"` // Connection age in seconds + ConnectionIdleSeconds *float64 `json:"connection_idle_seconds,omitempty"` // Connection idle time in seconds + Datid *int `json:"datid,omitempty"` // Database ID + Datname *string `json:"datname,omitempty"` // Database name + Flags []string `json:"flags,omitempty"` // Connection state flags + FlagsRaw *string `json:"flags_raw,omitempty"` // Raw connection flags string + Id *string `json:"id,omitempty"` // Unique connection ID + LeaderPid *int `json:"leader_pid,omitempty"` // Leader process ID + MultiExecCommands *int `json:"multi_exec_commands,omitempty"` // Number of MULTI/EXEC comands + Name *string `json:"name,omitempty"` // Connection name, if specified + OutputBuffer *int `json:"output_buffer,omitempty"` // Output buffer length (disabled if 0) + OutputBufferMemory *int `json:"output_buffer_memory,omitempty"` // Output buffer memory + OutputListLength *int `json:"output_list_length,omitempty"` // Output list, overflow for output buffering + Pid *int `json:"pid,omitempty"` // Connection process ID + Query *string `json:"query,omitempty"` // Last/current query running on this connection + QueryBuffer *int `json:"query_buffer,omitempty"` // Query buffer length (disabled if 0) + QueryBufferFree *int `json:"query_buffer_free,omitempty"` // Free bytes in query buffer, if enabled + QueryDuration *float64 `json:"query_duration,omitempty"` // Duration of the last/current query in seconds + QueryId *int `json:"query_id,omitempty"` // Hash code to identify identical normalized queries. + QueryStart *string `json:"query_start,omitempty"` // Timestamp in ISO 8601 format, always in UTC + State *string `json:"state,omitempty"` // Connection state + StateChange *string `json:"state_change,omitempty"` // Timestamp in ISO 8601 format, always in UTC + Usename *string `json:"usename,omitempty"` // Username + Usesysid *int `json:"usesysid,omitempty"` // User ID + WaitEvent *string `json:"wait_event,omitempty"` // Connection wait event + WaitEventType *string `json:"wait_event_type,omitempty"` // Connection wait event type + Waiting *bool `json:"waiting,omitempty"` // Query is waiting + XactStart *string `json:"xact_start,omitempty"` // Timestamp in ISO 8601 format, always in UTC } type RecoveryModeType string @@ -1167,16 +1223,17 @@ func RecoveryModeTypeChoices() []string { return []string{"basic", "pitr"} } +// RedisOut Service type information type RedisOut struct { - DefaultVersion *string `json:"default_version,omitempty"` - Description string `json:"description"` - LatestAvailableVersion *string `json:"latest_available_version,omitempty"` - ServicePlans []ServicePlanOut `json:"service_plans"` - UserConfigSchema map[string]any `json:"user_config_schema"` + DefaultVersion *string `json:"default_version,omitempty"` // Default version of the service if no explicit version is defined + Description string `json:"description"` // Single line description of the service + LatestAvailableVersion *string `json:"latest_available_version,omitempty"` // Latest available version of the service + ServicePlans []ServicePlanOut `json:"service_plans"` // List of plans available for this type of service + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } type ResultCodeOut struct { - Code string `json:"code"` - Dbname *string `json:"dbname,omitempty"` + Code string `json:"code"` // Machine-readable key code, which represents the result of the task + Dbname *string `json:"dbname,omitempty"` // Database which related to the result code } type RoleType string @@ -1204,161 +1261,179 @@ func RouteTypeChoices() []string { } type SchemaRegistryAclOut struct { - Id *string `json:"id,omitempty"` - Permission PermissionTypeAlt `json:"permission"` - Resource string `json:"resource"` + Id *string `json:"id,omitempty"` // ID + Permission PermissionTypeAlt `json:"permission"` // ACL entry for Schema Registry + Resource string `json:"resource"` // Schema Registry ACL entry resource name pattern Username string `json:"username"` } + +// ServiceBackupToAnotherRegionReportIn ServiceBackupToAnotherRegionReportRequestBody type ServiceBackupToAnotherRegionReportIn struct { - Period PeriodType `json:"period,omitempty"` + Period PeriodType `json:"period,omitempty"` // Metrics time period } + +// ServiceCancelQueryIn ServiceCancelQueryRequestBody type ServiceCancelQueryIn struct { - Pid *int `json:"pid,omitempty"` - Terminate *bool `json:"terminate,omitempty"` + Pid *int `json:"pid,omitempty"` // Database server connection ID + Terminate *bool `json:"terminate,omitempty"` // Request immediate termination instead of soft cancel } + +// ServiceCreateIn ServiceCreateRequestBody type ServiceCreateIn struct { - Cloud *string `json:"cloud,omitempty"` - CopyTags *bool `json:"copy_tags,omitempty"` - DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` - GroupName *string `json:"group_name,omitempty"` - Maintenance *MaintenanceIn `json:"maintenance,omitempty"` - Plan string `json:"plan"` - ProjectVpcId *string `json:"project_vpc_id,omitempty"` - ServiceIntegrations *[]ServiceIntegrationIn `json:"service_integrations,omitempty"` - ServiceName string `json:"service_name"` - ServiceType string `json:"service_type"` - StaticIps *[]string `json:"static_ips,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - TechEmails *[]TechEmailIn `json:"tech_emails,omitempty"` - TerminationProtection *bool `json:"termination_protection,omitempty"` - UserConfig *map[string]any `json:"user_config,omitempty"` -} + Cloud *string `json:"cloud,omitempty"` // Target cloud + CopyTags *bool `json:"copy_tags,omitempty"` // If this is a forked service, copy tags from the source service. If request contains additional tags, the tags copied from source are updated with them. + DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` // Megabytes of disk space for data storage + GroupName *string `json:"group_name,omitempty"` // Service group name (DEPRECATED: do not use) + Maintenance *MaintenanceIn `json:"maintenance,omitempty"` // Automatic maintenance settings + Plan string `json:"plan"` // Subscription plan + ProjectVpcId *string `json:"project_vpc_id,omitempty"` // Project VPC ID + ServiceIntegrations *[]ServiceIntegrationIn `json:"service_integrations,omitempty"` // Service integrations to enable for the service. Some integration types affect how a service is created and they must be provided as part of the creation call instead of being defined later. + ServiceName string `json:"service_name"` // Service name + ServiceType string `json:"service_type"` // Service type code + StaticIps *[]string `json:"static_ips,omitempty"` // Static IP addresses to associate with the service + Tags *map[string]string `json:"tags,omitempty"` // Set of resource tags + TechEmails *[]TechEmailIn `json:"tech_emails,omitempty"` // List of service technical email addresses + TerminationProtection *bool `json:"termination_protection,omitempty"` // Service is protected against termination and powering off + UserConfig *map[string]any `json:"user_config,omitempty"` // Service type-specific settings +} + +// ServiceCreateOut Service information type ServiceCreateOut struct { - Acl []AclOut `json:"acl,omitempty"` - Backups []BackupOut `json:"backups,omitempty"` - CloudDescription *string `json:"cloud_description,omitempty"` - CloudName string `json:"cloud_name"` - Components []ComponentOut `json:"components,omitempty"` - ConnectionInfo map[string]any `json:"connection_info,omitempty"` - ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` - CreateTime time.Time `json:"create_time"` - Databases []string `json:"databases,omitempty"` - DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` - Features map[string]any `json:"features,omitempty"` - GroupList []string `json:"group_list"` - Maintenance *MaintenanceOut `json:"maintenance,omitempty"` - Metadata map[string]any `json:"metadata,omitempty"` - NodeCount *int `json:"node_count,omitempty"` - NodeCpuCount *int `json:"node_cpu_count,omitempty"` - NodeMemoryMb *float64 `json:"node_memory_mb,omitempty"` - NodeStates []NodeStateOut `json:"node_states,omitempty"` - Plan string `json:"plan"` - ProjectVpcId string `json:"project_vpc_id"` - SchemaRegistryAcl []SchemaRegistryAclOut `json:"schema_registry_acl,omitempty"` - ServiceIntegrations []ServiceIntegrationOut `json:"service_integrations"` - ServiceName string `json:"service_name"` - ServiceNotifications []ServiceNotificationOut `json:"service_notifications,omitempty"` - ServiceType string `json:"service_type"` - ServiceTypeDescription *string `json:"service_type_description,omitempty"` - ServiceUri string `json:"service_uri"` - ServiceUriParams map[string]any `json:"service_uri_params,omitempty"` - State ServiceStateType `json:"state"` - Tags map[string]string `json:"tags,omitempty"` - TechEmails []TechEmailOut `json:"tech_emails,omitempty"` - TerminationProtection bool `json:"termination_protection"` - Topics []TopicOut `json:"topics,omitempty"` - UpdateTime time.Time `json:"update_time"` - UserConfig map[string]any `json:"user_config"` - Users []UserOut `json:"users,omitempty"` -} + Acl []AclOut `json:"acl,omitempty"` // List of Kafka ACL entries + Backups []BackupOut `json:"backups,omitempty"` // List of backups for the service + CloudDescription *string `json:"cloud_description,omitempty"` // Cloud provider and location + CloudName string `json:"cloud_name"` // Target cloud + Components []ComponentOut `json:"components,omitempty"` // Service component information objects + ConnectionInfo map[string]any `json:"connection_info,omitempty"` // Service-specific connection information properties + ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` // PostgreSQL PGBouncer connection pools + CreateTime time.Time `json:"create_time"` // Service creation timestamp (ISO 8601) + Databases []string `json:"databases,omitempty"` // List of service's user database names + DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` // Megabytes of disk space for data storage + Features map[string]any `json:"features,omitempty"` // Feature flags + GroupList []string `json:"group_list"` // List of service groups the service belongs to. This field is deprecated. It is always set to single element with value 'default' + Maintenance *MaintenanceOut `json:"maintenance,omitempty"` // Automatic maintenance settings + Metadata map[string]any `json:"metadata,omitempty"` // Service type specific metadata + NodeCount *int `json:"node_count,omitempty"` // Number of service nodes in the active plan + NodeCpuCount *int `json:"node_cpu_count,omitempty"` // Number of CPUs for each node + NodeMemoryMb *float64 `json:"node_memory_mb,omitempty"` // Megabytes of memory for each node + NodeStates []NodeStateOut `json:"node_states,omitempty"` // State of individual service nodes + Plan string `json:"plan"` // Subscription plan + ProjectVpcId string `json:"project_vpc_id"` // Project VPC ID + SchemaRegistryAcl []SchemaRegistryAclOut `json:"schema_registry_acl,omitempty"` // List of Schema Registry ACL entries + ServiceIntegrations []ServiceIntegrationOut `json:"service_integrations"` // Integrations with other services + ServiceName string `json:"service_name"` // Service name + ServiceNotifications []ServiceNotificationOut `json:"service_notifications,omitempty"` // Service notifications + ServiceType string `json:"service_type"` // Service type code + ServiceTypeDescription *string `json:"service_type_description,omitempty"` // Single line description of the service + ServiceUri string `json:"service_uri"` // URI for connecting to the service (may be null) + ServiceUriParams map[string]any `json:"service_uri_params,omitempty"` // service_uri parameterized into key-value pairs + State ServiceStateType `json:"state"` // State of the service + Tags map[string]string `json:"tags,omitempty"` // Set of resource tags + TechEmails []TechEmailOut `json:"tech_emails,omitempty"` // List of service technical email addresses + TerminationProtection bool `json:"termination_protection"` // Service is protected against termination and powering off + Topics []TopicOut `json:"topics,omitempty"` // Kafka topics. DEPRECATED: Use /project/$project/service/$service/topic instead + UpdateTime time.Time `json:"update_time"` // Service last update timestamp (ISO 8601) + UserConfig map[string]any `json:"user_config"` // Service type-specific settings + Users []UserOut `json:"users,omitempty"` // List of service users +} + +// ServiceDatabaseCreateIn ServiceDatabaseCreateRequestBody type ServiceDatabaseCreateIn struct { - Database string `json:"database"` - LcCollate *string `json:"lc_collate,omitempty"` - LcCtype *string `json:"lc_ctype,omitempty"` + Database string `json:"database"` // Service database name + LcCollate *string `json:"lc_collate,omitempty"` // Default string sort order (LC_COLLATE) for PostgreSQL database + LcCtype *string `json:"lc_ctype,omitempty"` // Default character classification (LC_CTYPE) for PostgreSQL database } + +// ServiceGetMigrationStatusOut ServiceGetMigrationStatusResponse type ServiceGetMigrationStatusOut struct { - Migration MigrationOut `json:"migration"` - MigrationDetail []MigrationDetailOut `json:"migration_detail,omitempty"` + Migration MigrationOut `json:"migration"` // Service migration info + MigrationDetail []MigrationDetailOut `json:"migration_detail,omitempty"` // Migration status per database } + +// ServiceGetOut Service information type ServiceGetOut struct { - Acl []AclOut `json:"acl,omitempty"` - Backups []BackupOut `json:"backups,omitempty"` - CloudDescription *string `json:"cloud_description,omitempty"` - CloudName string `json:"cloud_name"` - Components []ComponentOut `json:"components,omitempty"` - ConnectionInfo map[string]any `json:"connection_info,omitempty"` - ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` - CreateTime time.Time `json:"create_time"` - Databases []string `json:"databases,omitempty"` - DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` - Features map[string]any `json:"features,omitempty"` - GroupList []string `json:"group_list"` - Maintenance *MaintenanceOut `json:"maintenance,omitempty"` - Metadata map[string]any `json:"metadata,omitempty"` - NodeCount *int `json:"node_count,omitempty"` - NodeCpuCount *int `json:"node_cpu_count,omitempty"` - NodeMemoryMb *float64 `json:"node_memory_mb,omitempty"` - NodeStates []NodeStateOut `json:"node_states,omitempty"` - Plan string `json:"plan"` - ProjectVpcId string `json:"project_vpc_id"` - SchemaRegistryAcl []SchemaRegistryAclOut `json:"schema_registry_acl,omitempty"` - ServiceIntegrations []ServiceIntegrationOut `json:"service_integrations"` - ServiceName string `json:"service_name"` - ServiceNotifications []ServiceNotificationOut `json:"service_notifications,omitempty"` - ServiceType string `json:"service_type"` - ServiceTypeDescription *string `json:"service_type_description,omitempty"` - ServiceUri string `json:"service_uri"` - ServiceUriParams map[string]any `json:"service_uri_params,omitempty"` - State ServiceStateType `json:"state"` - Tags map[string]string `json:"tags,omitempty"` - TechEmails []TechEmailOut `json:"tech_emails,omitempty"` - TerminationProtection bool `json:"termination_protection"` - Topics []TopicOut `json:"topics,omitempty"` - UpdateTime time.Time `json:"update_time"` - UserConfig map[string]any `json:"user_config"` - Users []UserOut `json:"users,omitempty"` + Acl []AclOut `json:"acl,omitempty"` // List of Kafka ACL entries + Backups []BackupOut `json:"backups,omitempty"` // List of backups for the service + CloudDescription *string `json:"cloud_description,omitempty"` // Cloud provider and location + CloudName string `json:"cloud_name"` // Target cloud + Components []ComponentOut `json:"components,omitempty"` // Service component information objects + ConnectionInfo map[string]any `json:"connection_info,omitempty"` // Service-specific connection information properties + ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` // PostgreSQL PGBouncer connection pools + CreateTime time.Time `json:"create_time"` // Service creation timestamp (ISO 8601) + Databases []string `json:"databases,omitempty"` // List of service's user database names + DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` // Megabytes of disk space for data storage + Features map[string]any `json:"features,omitempty"` // Feature flags + GroupList []string `json:"group_list"` // List of service groups the service belongs to. This field is deprecated. It is always set to single element with value 'default' + Maintenance *MaintenanceOut `json:"maintenance,omitempty"` // Automatic maintenance settings + Metadata map[string]any `json:"metadata,omitempty"` // Service type specific metadata + NodeCount *int `json:"node_count,omitempty"` // Number of service nodes in the active plan + NodeCpuCount *int `json:"node_cpu_count,omitempty"` // Number of CPUs for each node + NodeMemoryMb *float64 `json:"node_memory_mb,omitempty"` // Megabytes of memory for each node + NodeStates []NodeStateOut `json:"node_states,omitempty"` // State of individual service nodes + Plan string `json:"plan"` // Subscription plan + ProjectVpcId string `json:"project_vpc_id"` // Project VPC ID + SchemaRegistryAcl []SchemaRegistryAclOut `json:"schema_registry_acl,omitempty"` // List of Schema Registry ACL entries + ServiceIntegrations []ServiceIntegrationOut `json:"service_integrations"` // Integrations with other services + ServiceName string `json:"service_name"` // Service name + ServiceNotifications []ServiceNotificationOut `json:"service_notifications,omitempty"` // Service notifications + ServiceType string `json:"service_type"` // Service type code + ServiceTypeDescription *string `json:"service_type_description,omitempty"` // Single line description of the service + ServiceUri string `json:"service_uri"` // URI for connecting to the service (may be null) + ServiceUriParams map[string]any `json:"service_uri_params,omitempty"` // service_uri parameterized into key-value pairs + State ServiceStateType `json:"state"` // State of the service + Tags map[string]string `json:"tags,omitempty"` // Set of resource tags + TechEmails []TechEmailOut `json:"tech_emails,omitempty"` // List of service technical email addresses + TerminationProtection bool `json:"termination_protection"` // Service is protected against termination and powering off + Topics []TopicOut `json:"topics,omitempty"` // Kafka topics. DEPRECATED: Use /project/$project/service/$service/topic instead + UpdateTime time.Time `json:"update_time"` // Service last update timestamp (ISO 8601) + UserConfig map[string]any `json:"user_config"` // Service type-specific settings + Users []UserOut `json:"users,omitempty"` // List of service users } type ServiceIntegrationIn struct { - DestEndpointId *string `json:"dest_endpoint_id,omitempty"` - DestProject *string `json:"dest_project,omitempty"` - DestService *string `json:"dest_service,omitempty"` - IntegrationType IntegrationType `json:"integration_type"` - SourceEndpointId *string `json:"source_endpoint_id,omitempty"` - SourceProject *string `json:"source_project,omitempty"` - SourceService *string `json:"source_service,omitempty"` - UserConfig *map[string]any `json:"user_config,omitempty"` + DestEndpointId *string `json:"dest_endpoint_id,omitempty"` // Integration destination endpoint ID + DestProject *string `json:"dest_project,omitempty"` // Destination project name + DestService *string `json:"dest_service,omitempty"` // Destination service name + IntegrationType IntegrationType `json:"integration_type"` // Service integration type + SourceEndpointId *string `json:"source_endpoint_id,omitempty"` // Integration source endpoint ID + SourceProject *string `json:"source_project,omitempty"` // Source project name + SourceService *string `json:"source_service,omitempty"` // Source service name + UserConfig *map[string]any `json:"user_config,omitempty"` // Service type-specific settings } type ServiceIntegrationOut struct { - Active bool `json:"active"` - Description string `json:"description"` - DestEndpoint *string `json:"dest_endpoint,omitempty"` - DestEndpointId *string `json:"dest_endpoint_id,omitempty"` - DestProject string `json:"dest_project"` - DestService *string `json:"dest_service,omitempty"` - DestServiceType string `json:"dest_service_type"` - Enabled bool `json:"enabled"` - IntegrationStatus *IntegrationStatusOut `json:"integration_status,omitempty"` - IntegrationType string `json:"integration_type"` - ServiceIntegrationId string `json:"service_integration_id"` - SourceEndpoint *string `json:"source_endpoint,omitempty"` - SourceEndpointId *string `json:"source_endpoint_id,omitempty"` - SourceProject string `json:"source_project"` - SourceService string `json:"source_service"` - SourceServiceType string `json:"source_service_type"` - UserConfig map[string]any `json:"user_config,omitempty"` -} + Active bool `json:"active"` // True when integration is active + Description string `json:"description"` // Description of the integration + DestEndpoint *string `json:"dest_endpoint,omitempty"` // Destination endpoint name + DestEndpointId *string `json:"dest_endpoint_id,omitempty"` // Destination endpoint id + DestProject string `json:"dest_project"` // Project name + DestService *string `json:"dest_service,omitempty"` // Destination service name + DestServiceType string `json:"dest_service_type"` // Service type code + Enabled bool `json:"enabled"` // True when integration is enabled + IntegrationStatus *IntegrationStatusOut `json:"integration_status,omitempty"` // Integration status + IntegrationType string `json:"integration_type"` // Type of the integration + ServiceIntegrationId string `json:"service_integration_id"` // Integration ID + SourceEndpoint *string `json:"source_endpoint,omitempty"` // Source endpoint name + SourceEndpointId *string `json:"source_endpoint_id,omitempty"` // Source endpoint ID + SourceProject string `json:"source_project"` // Project name + SourceService string `json:"source_service"` // Source service name + SourceServiceType string `json:"source_service_type"` // Service type code + UserConfig map[string]any `json:"user_config,omitempty"` // Service integration settings +} + +// ServiceKmsGetKeypairOut ServiceKmsGetKeypairResponse type ServiceKmsGetKeypairOut struct { - Certificate string `json:"certificate"` - Key string `json:"key"` + Certificate string `json:"certificate"` // PEM encoded certificate + Key string `json:"key"` // PEM encoded private key } + +// ServiceMetricsFetchIn ServiceMetricsFetchRequestBody type ServiceMetricsFetchIn struct { - Period PeriodType `json:"period,omitempty"` + Period PeriodType `json:"period,omitempty"` // Metrics time period } type ServiceNotificationOut struct { - Level LevelType `json:"level"` - Message string `json:"message"` - Metadata MetadataOut `json:"metadata"` - Type ServiceNotificationType `json:"type"` + Level LevelType `json:"level"` // Notification level + Message string `json:"message"` // Human notification message + Metadata MetadataOut `json:"metadata"` // Notification metadata + Type ServiceNotificationType `json:"type"` // Notification type } type ServiceNotificationType string @@ -1372,56 +1447,58 @@ func ServiceNotificationTypeChoices() []string { } type ServiceOut struct { - Acl []AclOut `json:"acl,omitempty"` - Backups []BackupOut `json:"backups,omitempty"` - CloudDescription *string `json:"cloud_description,omitempty"` - CloudName string `json:"cloud_name"` - Components []ComponentOut `json:"components,omitempty"` - ConnectionInfo map[string]any `json:"connection_info,omitempty"` - ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` - CreateTime time.Time `json:"create_time"` - Databases []string `json:"databases,omitempty"` - DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` - Features map[string]any `json:"features,omitempty"` - GroupList []string `json:"group_list"` - Maintenance *MaintenanceOut `json:"maintenance,omitempty"` - Metadata map[string]any `json:"metadata,omitempty"` - NodeCount *int `json:"node_count,omitempty"` - NodeCpuCount *int `json:"node_cpu_count,omitempty"` - NodeMemoryMb *float64 `json:"node_memory_mb,omitempty"` - NodeStates []NodeStateOut `json:"node_states,omitempty"` - Plan string `json:"plan"` - ProjectVpcId string `json:"project_vpc_id"` - SchemaRegistryAcl []SchemaRegistryAclOut `json:"schema_registry_acl,omitempty"` - ServiceIntegrations []ServiceIntegrationOut `json:"service_integrations"` - ServiceName string `json:"service_name"` - ServiceNotifications []ServiceNotificationOut `json:"service_notifications,omitempty"` - ServiceType string `json:"service_type"` - ServiceTypeDescription *string `json:"service_type_description,omitempty"` - ServiceUri string `json:"service_uri"` - ServiceUriParams map[string]any `json:"service_uri_params,omitempty"` - State ServiceStateType `json:"state"` - Tags map[string]string `json:"tags,omitempty"` - TechEmails []TechEmailOut `json:"tech_emails,omitempty"` - TerminationProtection bool `json:"termination_protection"` - Topics []TopicOut `json:"topics,omitempty"` - UpdateTime time.Time `json:"update_time"` - UserConfig map[string]any `json:"user_config"` - Users []UserOut `json:"users,omitempty"` + Acl []AclOut `json:"acl,omitempty"` // List of Kafka ACL entries + Backups []BackupOut `json:"backups,omitempty"` // List of backups for the service + CloudDescription *string `json:"cloud_description,omitempty"` // Cloud provider and location + CloudName string `json:"cloud_name"` // Target cloud + Components []ComponentOut `json:"components,omitempty"` // Service component information objects + ConnectionInfo map[string]any `json:"connection_info,omitempty"` // Service-specific connection information properties + ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` // PostgreSQL PGBouncer connection pools + CreateTime time.Time `json:"create_time"` // Service creation timestamp (ISO 8601) + Databases []string `json:"databases,omitempty"` // List of service's user database names + DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` // Megabytes of disk space for data storage + Features map[string]any `json:"features,omitempty"` // Feature flags + GroupList []string `json:"group_list"` // List of service groups the service belongs to. This field is deprecated. It is always set to single element with value 'default' + Maintenance *MaintenanceOut `json:"maintenance,omitempty"` // Automatic maintenance settings + Metadata map[string]any `json:"metadata,omitempty"` // Service type specific metadata + NodeCount *int `json:"node_count,omitempty"` // Number of service nodes in the active plan + NodeCpuCount *int `json:"node_cpu_count,omitempty"` // Number of CPUs for each node + NodeMemoryMb *float64 `json:"node_memory_mb,omitempty"` // Megabytes of memory for each node + NodeStates []NodeStateOut `json:"node_states,omitempty"` // State of individual service nodes + Plan string `json:"plan"` // Subscription plan + ProjectVpcId string `json:"project_vpc_id"` // Project VPC ID + SchemaRegistryAcl []SchemaRegistryAclOut `json:"schema_registry_acl,omitempty"` // List of Schema Registry ACL entries + ServiceIntegrations []ServiceIntegrationOut `json:"service_integrations"` // Integrations with other services + ServiceName string `json:"service_name"` // Service name + ServiceNotifications []ServiceNotificationOut `json:"service_notifications,omitempty"` // Service notifications + ServiceType string `json:"service_type"` // Service type code + ServiceTypeDescription *string `json:"service_type_description,omitempty"` // Single line description of the service + ServiceUri string `json:"service_uri"` // URI for connecting to the service (may be null) + ServiceUriParams map[string]any `json:"service_uri_params,omitempty"` // service_uri parameterized into key-value pairs + State ServiceStateType `json:"state"` // State of the service + Tags map[string]string `json:"tags,omitempty"` // Set of resource tags + TechEmails []TechEmailOut `json:"tech_emails,omitempty"` // List of service technical email addresses + TerminationProtection bool `json:"termination_protection"` // Service is protected against termination and powering off + Topics []TopicOut `json:"topics,omitempty"` // Kafka topics. DEPRECATED: Use /project/$project/service/$service/topic instead + UpdateTime time.Time `json:"update_time"` // Service last update timestamp (ISO 8601) + UserConfig map[string]any `json:"user_config"` // Service type-specific settings + Users []UserOut `json:"users,omitempty"` // List of service users } type ServicePlanOut struct { - BackupConfig BackupConfigOut `json:"backup_config"` - MaxMemoryPercent *int `json:"max_memory_percent,omitempty"` - NodeCount *int `json:"node_count,omitempty"` - Regions map[string]any `json:"regions,omitempty"` - ServicePlan string `json:"service_plan"` - ServiceType string `json:"service_type"` - ShardCount *int `json:"shard_count,omitempty"` + BackupConfig BackupConfigOut `json:"backup_config"` // Backup configuration for this service plan + MaxMemoryPercent *int `json:"max_memory_percent,omitempty"` // Maximum amount of system memory as a percentage (0-100) the service can actually use after taking into account management overhead. This is relevant for memory bound services for which some service management operations require allocating proportional amount of memory on top the basic load. + NodeCount *int `json:"node_count,omitempty"` // Number of nodes in this service plan + Regions map[string]any `json:"regions,omitempty"` // Service plan hourly price per cloud region + ServicePlan string `json:"service_plan"` // Subscription plan + ServiceType string `json:"service_type"` // Service type code + ShardCount *int `json:"shard_count,omitempty"` // Number of shards in this service plan } + +// ServiceQueryActivityIn ServiceQueryActivityRequestBody type ServiceQueryActivityIn struct { - Limit *int `json:"limit,omitempty"` - Offset *int `json:"offset,omitempty"` - OrderBy *string `json:"order_by,omitempty"` + Limit *int `json:"limit,omitempty"` // Limit for number of results + Offset *int `json:"offset,omitempty"` // Offset for retrieved results based on sort order + OrderBy *string `json:"order_by,omitempty"` // Order in which to sort retrieved results } type ServiceStateType string @@ -1436,92 +1513,101 @@ func ServiceStateTypeChoices() []string { return []string{"POWEROFF", "REBALANCING", "REBUILDING", "RUNNING"} } +// ServiceTaskCreateIn ServiceTaskCreateRequestBody type ServiceTaskCreateIn struct { - DatasetImport *DatasetImportIn `json:"dataset_import,omitempty"` - MigrationCheck *MigrationCheckIn `json:"migration_check,omitempty"` - TargetVersion TargetVersionType `json:"target_version,omitempty"` - TaskType TaskType `json:"task_type"` + DatasetImport *DatasetImportIn `json:"dataset_import,omitempty"` // Payload to be used with dataset_import + MigrationCheck *MigrationCheckIn `json:"migration_check,omitempty"` // Payload to be used with migration_check + TargetVersion TargetVersionType `json:"target_version,omitempty"` // Target version used with upgrade_check + TaskType TaskType `json:"task_type"` // Service task type } + +// ServiceTaskCreateOut Task info type ServiceTaskCreateOut struct { - CreateTime time.Time `json:"create_time"` - Result string `json:"result"` - ResultCodes []ResultCodeOut `json:"result_codes,omitempty"` - Success bool `json:"success"` - TaskId string `json:"task_id"` - TaskType string `json:"task_type"` + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + Result string `json:"result"` // Task result + ResultCodes []ResultCodeOut `json:"result_codes,omitempty"` // List of result codes + Success bool `json:"success"` // Task success + TaskId string `json:"task_id"` // Unique identifier for the task + TaskType string `json:"task_type"` // Task type } + +// ServiceTaskGetOut Task info type ServiceTaskGetOut struct { - CreateTime time.Time `json:"create_time"` - Result string `json:"result"` - ResultCodes []ResultCodeOut `json:"result_codes,omitempty"` - Success bool `json:"success"` - TaskId string `json:"task_id"` - TaskType string `json:"task_type"` + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + Result string `json:"result"` // Task result + ResultCodes []ResultCodeOut `json:"result_codes,omitempty"` // List of result codes + Success bool `json:"success"` // Task success + TaskId string `json:"task_id"` // Unique identifier for the task + TaskType string `json:"task_type"` // Task type } + +// ServiceUpdateIn ServiceUpdateRequestBody type ServiceUpdateIn struct { - Cloud *string `json:"cloud,omitempty"` - DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` - GroupName *string `json:"group_name,omitempty"` - Karapace *bool `json:"karapace,omitempty"` - Maintenance *MaintenanceIn `json:"maintenance,omitempty"` - Plan *string `json:"plan,omitempty"` - Powered *bool `json:"powered,omitempty"` - ProjectVpcId *string `json:"project_vpc_id,omitempty"` - SchemaRegistryAuthz *bool `json:"schema_registry_authz,omitempty"` - TechEmails *[]TechEmailIn `json:"tech_emails,omitempty"` - TerminationProtection *bool `json:"termination_protection,omitempty"` - UserConfig *map[string]any `json:"user_config,omitempty"` -} + Cloud *string `json:"cloud,omitempty"` // Target cloud + DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` // Megabytes of disk space for data storage + GroupName *string `json:"group_name,omitempty"` // Service group name (DEPRECATED: do not use) + Karapace *bool `json:"karapace,omitempty"` // Switch the service to use Karapace for schema registry and REST proxy + Maintenance *MaintenanceIn `json:"maintenance,omitempty"` // Automatic maintenance settings + Plan *string `json:"plan,omitempty"` // Subscription plan + Powered *bool `json:"powered,omitempty"` // Power-on the service (true) or power-off (false) + ProjectVpcId *string `json:"project_vpc_id,omitempty"` // Project VPC ID + SchemaRegistryAuthz *bool `json:"schema_registry_authz,omitempty"` // Enable or disable Schema Registry authorization + TechEmails *[]TechEmailIn `json:"tech_emails,omitempty"` // List of service technical email addresses + TerminationProtection *bool `json:"termination_protection,omitempty"` // Service is protected against termination and powering off + UserConfig *map[string]any `json:"user_config,omitempty"` // Service type-specific settings +} + +// ServiceUpdateOut Service information type ServiceUpdateOut struct { - Acl []AclOut `json:"acl,omitempty"` - Backups []BackupOut `json:"backups,omitempty"` - CloudDescription *string `json:"cloud_description,omitempty"` - CloudName string `json:"cloud_name"` - Components []ComponentOut `json:"components,omitempty"` - ConnectionInfo map[string]any `json:"connection_info,omitempty"` - ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` - CreateTime time.Time `json:"create_time"` - Databases []string `json:"databases,omitempty"` - DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` - Features map[string]any `json:"features,omitempty"` - GroupList []string `json:"group_list"` - Maintenance *MaintenanceOut `json:"maintenance,omitempty"` - Metadata map[string]any `json:"metadata,omitempty"` - NodeCount *int `json:"node_count,omitempty"` - NodeCpuCount *int `json:"node_cpu_count,omitempty"` - NodeMemoryMb *float64 `json:"node_memory_mb,omitempty"` - NodeStates []NodeStateOut `json:"node_states,omitempty"` - Plan string `json:"plan"` - ProjectVpcId string `json:"project_vpc_id"` - SchemaRegistryAcl []SchemaRegistryAclOut `json:"schema_registry_acl,omitempty"` - ServiceIntegrations []ServiceIntegrationOut `json:"service_integrations"` - ServiceName string `json:"service_name"` - ServiceNotifications []ServiceNotificationOut `json:"service_notifications,omitempty"` - ServiceType string `json:"service_type"` - ServiceTypeDescription *string `json:"service_type_description,omitempty"` - ServiceUri string `json:"service_uri"` - ServiceUriParams map[string]any `json:"service_uri_params,omitempty"` - State ServiceStateType `json:"state"` - Tags map[string]string `json:"tags,omitempty"` - TechEmails []TechEmailOut `json:"tech_emails,omitempty"` - TerminationProtection bool `json:"termination_protection"` - Topics []TopicOut `json:"topics,omitempty"` - UpdateTime time.Time `json:"update_time"` - UserConfig map[string]any `json:"user_config"` - Users []UserOut `json:"users,omitempty"` + Acl []AclOut `json:"acl,omitempty"` // List of Kafka ACL entries + Backups []BackupOut `json:"backups,omitempty"` // List of backups for the service + CloudDescription *string `json:"cloud_description,omitempty"` // Cloud provider and location + CloudName string `json:"cloud_name"` // Target cloud + Components []ComponentOut `json:"components,omitempty"` // Service component information objects + ConnectionInfo map[string]any `json:"connection_info,omitempty"` // Service-specific connection information properties + ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` // PostgreSQL PGBouncer connection pools + CreateTime time.Time `json:"create_time"` // Service creation timestamp (ISO 8601) + Databases []string `json:"databases,omitempty"` // List of service's user database names + DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` // Megabytes of disk space for data storage + Features map[string]any `json:"features,omitempty"` // Feature flags + GroupList []string `json:"group_list"` // List of service groups the service belongs to. This field is deprecated. It is always set to single element with value 'default' + Maintenance *MaintenanceOut `json:"maintenance,omitempty"` // Automatic maintenance settings + Metadata map[string]any `json:"metadata,omitempty"` // Service type specific metadata + NodeCount *int `json:"node_count,omitempty"` // Number of service nodes in the active plan + NodeCpuCount *int `json:"node_cpu_count,omitempty"` // Number of CPUs for each node + NodeMemoryMb *float64 `json:"node_memory_mb,omitempty"` // Megabytes of memory for each node + NodeStates []NodeStateOut `json:"node_states,omitempty"` // State of individual service nodes + Plan string `json:"plan"` // Subscription plan + ProjectVpcId string `json:"project_vpc_id"` // Project VPC ID + SchemaRegistryAcl []SchemaRegistryAclOut `json:"schema_registry_acl,omitempty"` // List of Schema Registry ACL entries + ServiceIntegrations []ServiceIntegrationOut `json:"service_integrations"` // Integrations with other services + ServiceName string `json:"service_name"` // Service name + ServiceNotifications []ServiceNotificationOut `json:"service_notifications,omitempty"` // Service notifications + ServiceType string `json:"service_type"` // Service type code + ServiceTypeDescription *string `json:"service_type_description,omitempty"` // Single line description of the service + ServiceUri string `json:"service_uri"` // URI for connecting to the service (may be null) + ServiceUriParams map[string]any `json:"service_uri_params,omitempty"` // service_uri parameterized into key-value pairs + State ServiceStateType `json:"state"` // State of the service + Tags map[string]string `json:"tags,omitempty"` // Set of resource tags + TechEmails []TechEmailOut `json:"tech_emails,omitempty"` // List of service technical email addresses + TerminationProtection bool `json:"termination_protection"` // Service is protected against termination and powering off + Topics []TopicOut `json:"topics,omitempty"` // Kafka topics. DEPRECATED: Use /project/$project/service/$service/topic instead + UpdateTime time.Time `json:"update_time"` // Service last update timestamp (ISO 8601) + UserConfig map[string]any `json:"user_config"` // Service type-specific settings + Users []UserOut `json:"users,omitempty"` // List of service users } type ServiceVersionOut struct { - AivenEndOfLifeTime *time.Time `json:"aiven_end_of_life_time,omitempty"` - AvailabilityEndTime *time.Time `json:"availability_end_time,omitempty"` - AvailabilityStartTime *time.Time `json:"availability_start_time,omitempty"` - EndOfLifeHelpArticleUrl *string `json:"end_of_life_help_article_url,omitempty"` - MajorVersion *string `json:"major_version,omitempty"` - ServiceType *string `json:"service_type,omitempty"` - State ServiceVersionStateType `json:"state,omitempty"` - TerminationTime *time.Time `json:"termination_time,omitempty"` - UpgradeToServiceType *string `json:"upgrade_to_service_type,omitempty"` - UpgradeToVersion *string `json:"upgrade_to_version,omitempty"` - UpstreamEndOfLifeTime *time.Time `json:"upstream_end_of_life_time,omitempty"` + AivenEndOfLifeTime *time.Time `json:"aiven_end_of_life_time,omitempty"` // Aiven end-of-life timestamp (ISO 8601) + AvailabilityEndTime *time.Time `json:"availability_end_time,omitempty"` // Availability end timestamp (ISO 8601) + AvailabilityStartTime *time.Time `json:"availability_start_time,omitempty"` // Availability start timestamp (ISO 8601) + EndOfLifeHelpArticleUrl *string `json:"end_of_life_help_article_url,omitempty"` // Link to the help article + MajorVersion *string `json:"major_version,omitempty"` // Service version + ServiceType *string `json:"service_type,omitempty"` // Service type code + State ServiceVersionStateType `json:"state,omitempty"` // Service state + TerminationTime *time.Time `json:"termination_time,omitempty"` // Termination timestamp (ISO 8601) + UpgradeToServiceType *string `json:"upgrade_to_service_type,omitempty"` // If the customer takes no action, the service is updated to this service type when end of life is reached on the Aiven platform. If it is the same as the service type, the platform only upgrades the version. + UpgradeToVersion *string `json:"upgrade_to_version,omitempty"` // The version to which the service will be updated at the end of life on the Aiven platform if the user does not take any action + UpstreamEndOfLifeTime *time.Time `json:"upstream_end_of_life_time,omitempty"` // Upstream end-of-life timestamp (ISO 8601) } type ServiceVersionStateType string @@ -1537,9 +1623,10 @@ func ServiceVersionStateTypeChoices() []string { return []string{"available", "eol", "preview", "terminated", "unavailable"} } +// ShardOut Shard of this node. Only returned for a subset of service types type ShardOut struct { - Name *string `json:"name,omitempty"` - Position *int `json:"position,omitempty"` + Name *string `json:"name,omitempty"` // Name of the shard. + Position *int `json:"position,omitempty"` // Position of this shard within the service } type SortOrderType string @@ -1552,11 +1639,12 @@ func SortOrderTypeChoices() []string { return []string{"desc", "asc"} } +// StateOut Service integration state type StateOut struct { Errors []string `json:"errors"` - LikelyErrorCause LikelyErrorCauseType `json:"likely_error_cause,omitempty"` + LikelyErrorCause LikelyErrorCauseType `json:"likely_error_cause,omitempty"` // Most likely cause of the errors Nodes map[string]any `json:"nodes"` - Status IntegrationStatusType `json:"status"` + Status IntegrationStatusType `json:"status"` // Service integration status } type TargetVersionType string @@ -1584,20 +1672,20 @@ func TaskTypeChoices() []string { } type TechEmailIn struct { - Email string `json:"email"` + Email string `json:"email"` // User email address } type TechEmailOut struct { - Email string `json:"email"` + Email string `json:"email"` // User email address } type TopicOut struct { - CleanupPolicy string `json:"cleanup_policy"` - MinInsyncReplicas int `json:"min_insync_replicas"` - Partitions int `json:"partitions"` - Replication int `json:"replication"` - RetentionBytes int `json:"retention_bytes"` - RetentionHours int `json:"retention_hours"` - State TopicStateType `json:"state,omitempty"` - TopicName string `json:"topic_name"` + CleanupPolicy string `json:"cleanup_policy"` // cleanup.policy + MinInsyncReplicas int `json:"min_insync_replicas"` // min.insync.replicas + Partitions int `json:"partitions"` // Number of partitions + Replication int `json:"replication"` // Number of replicas + RetentionBytes int `json:"retention_bytes"` // retention.bytes + RetentionHours int `json:"retention_hours"` // Retention period (hours) + State TopicStateType `json:"state,omitempty"` // Topic state + TopicName string `json:"topic_name"` // Topic name } type TopicStateType string @@ -1625,10 +1713,10 @@ func UnitTypeChoices() []string { } type UpdateOut struct { - Deadline *string `json:"deadline,omitempty"` - Description *string `json:"description,omitempty"` - StartAfter *string `json:"start_after,omitempty"` - StartAt *time.Time `json:"start_at,omitempty"` + Deadline *string `json:"deadline,omitempty"` // Deadline for installing the update + Description *string `json:"description,omitempty"` // Description of the update + StartAfter *string `json:"start_after,omitempty"` // The earliest time the update will be automatically applied + StartAt *time.Time `json:"start_at,omitempty"` // The time when the update will be automatically applied } type UsageType string @@ -1642,76 +1730,122 @@ func UsageTypeChoices() []string { } type UserOut struct { - AccessCert *string `json:"access_cert,omitempty"` - AccessCertNotValidAfterTime *time.Time `json:"access_cert_not_valid_after_time,omitempty"` - AccessControl *AccessControlOut `json:"access_control,omitempty"` - AccessKey *string `json:"access_key,omitempty"` - Authentication AuthenticationType `json:"authentication,omitempty"` - ExpiringCertNotValidAfterTime *time.Time `json:"expiring_cert_not_valid_after_time,omitempty"` - Password string `json:"password"` - Type string `json:"type"` - Username string `json:"username"` -} + AccessCert *string `json:"access_cert,omitempty"` // Access certificate for TLS client authentication + AccessCertNotValidAfterTime *time.Time `json:"access_cert_not_valid_after_time,omitempty"` // Validity end time (ISO8601) for the current access certificate + AccessControl *AccessControlOut `json:"access_control,omitempty"` /* + Service specific access controls for user + + Service type specific access control rules for user. Currently only used for configuring user ACLs for Redis version 6 and above. + */ + AccessKey *string `json:"access_key,omitempty"` // Access key for TLS client authentication + Authentication AuthenticationType `json:"authentication,omitempty"` // Authentication details + ExpiringCertNotValidAfterTime *time.Time `json:"expiring_cert_not_valid_after_time,omitempty"` // Validity end time (ISO8601) for the expiring access certificate + Password string `json:"password"` // Account password. A null value indicates a user overridden password. + Type string `json:"type"` // Account type + Username string `json:"username"` // Account username +} + +// listProjectServiceTypesOut ListProjectServiceTypesResponse type listProjectServiceTypesOut struct { - ServiceTypes ListProjectServiceTypesOut `json:"service_types"` + ServiceTypes ListProjectServiceTypesOut `json:"service_types"` // Service plans by service type } + +// listPublicServiceTypesOut ListPublicServiceTypesResponse type listPublicServiceTypesOut struct { - ServiceTypes ListPublicServiceTypesOut `json:"service_types"` + ServiceTypes ListPublicServiceTypesOut `json:"service_types"` // Service plans by service type } + +// listServiceVersionsOut ListServiceVersionsResponse type listServiceVersionsOut struct { - ServiceVersions []ServiceVersionOut `json:"service_versions"` + ServiceVersions []ServiceVersionOut `json:"service_versions"` // Service versions } + +// projectServiceTagsListOut ProjectServiceTagsListResponse type projectServiceTagsListOut struct { - Tags map[string]string `json:"tags,omitempty"` + Tags map[string]string `json:"tags,omitempty"` // Set of resource tags } + +// serviceAlertsListOut ServiceAlertsListResponse type serviceAlertsListOut struct { - Alerts []AlertOut `json:"alerts"` + Alerts []AlertOut `json:"alerts"` // List of active alerts for the service } + +// serviceBackupToAnotherRegionReportOut ServiceBackupToAnotherRegionReportResponse type serviceBackupToAnotherRegionReportOut struct { - Metrics map[string]any `json:"metrics"` + Metrics map[string]any `json:"metrics"` // Service metrics in Google chart compatible format } + +// serviceBackupsGetOut ServiceBackupsGetResponse type serviceBackupsGetOut struct { - Backups []BackupOut `json:"backups"` + Backups []BackupOut `json:"backups"` // List of backups for the service } + +// serviceCancelQueryOut ServiceCancelQueryResponse type serviceCancelQueryOut struct { - Success bool `json:"success"` + Success bool `json:"success"` // Status reported by the database server } + +// serviceCreateOut ServiceCreateResponse type serviceCreateOut struct { - Service ServiceCreateOut `json:"service"` + Service ServiceCreateOut `json:"service"` // Service information } + +// serviceDatabaseListOut ServiceDatabaseListResponse type serviceDatabaseListOut struct { - Databases []DatabaseOut `json:"databases"` + Databases []DatabaseOut `json:"databases"` // List of databases } + +// serviceEnableWritesOut ServiceEnableWritesResponse type serviceEnableWritesOut struct { - Until *string `json:"until,omitempty"` + Until *string `json:"until,omitempty"` // Writes enabled until } + +// serviceGetOut ServiceGetResponse type serviceGetOut struct { - Service ServiceGetOut `json:"service"` + Service ServiceGetOut `json:"service"` // Service information } + +// serviceInfluxDbstatsOut ServiceInfluxDBStatsResponse type serviceInfluxDbstatsOut struct { - DbStats map[string]any `json:"db_stats"` + DbStats map[string]any `json:"db_stats"` // result } + +// serviceKmsGetCaOut ServiceKmsGetCAResponse type serviceKmsGetCaOut struct { - Certificate string `json:"certificate"` + Certificate string `json:"certificate"` // PEM encoded certificate } + +// serviceListOut ServiceListResponse type serviceListOut struct { - Services []ServiceOut `json:"services"` + Services []ServiceOut `json:"services"` // List of services under the project } + +// serviceMetricsFetchOut ServiceMetricsFetchResponse type serviceMetricsFetchOut struct { - Metrics map[string]any `json:"metrics"` + Metrics map[string]any `json:"metrics"` // Service metrics in Google chart compatible format } + +// serviceQueryActivityOut ServiceQueryActivityResponse type serviceQueryActivityOut struct { - Queries []QueryOut `json:"queries"` + Queries []QueryOut `json:"queries"` // List of currently running queries and open connections } + +// serviceQueryStatisticsResetOut ServiceQueryStatisticsResetResponse type serviceQueryStatisticsResetOut struct { - Queries []map[string]any `json:"queries"` + Queries []map[string]any `json:"queries"` // List of query statistics } + +// serviceTaskCreateOut ServiceTaskCreateResponse type serviceTaskCreateOut struct { - Task ServiceTaskCreateOut `json:"task"` + Task ServiceTaskCreateOut `json:"task"` // Task info } + +// serviceTaskGetOut ServiceTaskGetResponse type serviceTaskGetOut struct { - Task ServiceTaskGetOut `json:"task"` + Task ServiceTaskGetOut `json:"task"` // Task info } + +// serviceUpdateOut ServiceUpdateResponse type serviceUpdateOut struct { - Service ServiceUpdateOut `json:"service"` + Service ServiceUpdateOut `json:"service"` // Service information } diff --git a/handler/serviceintegration/serviceintegration.go b/handler/serviceintegration/serviceintegration.go index f4fa071..4363918 100644 --- a/handler/serviceintegration/serviceintegration.go +++ b/handler/serviceintegration/serviceintegration.go @@ -253,14 +253,16 @@ func EndpointTypeChoices() []string { } type EndpointTypeOut struct { - EndpointType string `json:"endpoint_type"` - ServiceTypes []string `json:"service_types"` - Title string `json:"title"` - UserConfigSchema map[string]any `json:"user_config_schema"` + EndpointType string `json:"endpoint_type"` // Endpoint type name + ServiceTypes []string `json:"service_types"` // Supported service types + Title string `json:"title"` // Endpoint type description + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } + +// IntegrationStatusOut Integration status type IntegrationStatusOut struct { - State StateOut `json:"state"` - StatusUserDesc string `json:"status_user_desc"` + State StateOut `json:"state"` // Service integration state + StatusUserDesc string `json:"status_user_desc"` // Integration status description } type IntegrationStatusType string @@ -328,13 +330,13 @@ func IntegrationTypeChoices() []string { } type IntegrationTypeOut struct { - DestDescription string `json:"dest_description"` - DestServiceType string `json:"dest_service_type"` - DestServiceTypes []string `json:"dest_service_types"` - IntegrationType string `json:"integration_type"` - SourceDescription string `json:"source_description"` - SourceServiceTypes []string `json:"source_service_types"` - UserConfigSchema map[string]any `json:"user_config_schema"` + DestDescription string `json:"dest_description"` // Description of the destination service + DestServiceType string `json:"dest_service_type"` // Service type. DEPRECATED: Use dest_service_types instead + DestServiceTypes []string `json:"dest_service_types"` // Supported destination service types + IntegrationType string `json:"integration_type"` // Integration type name + SourceDescription string `json:"source_description"` // Description of the source service + SourceServiceTypes []string `json:"source_service_types"` // Supported source service types + UserConfigSchema map[string]any `json:"user_config_schema"` // JSON-Schema for the 'user_config' properties } type LikelyErrorCauseType string @@ -350,164 +352,205 @@ func LikelyErrorCauseTypeChoices() []string { return []string{"null", "destination", "integration", "source", "unknown"} } +// ServiceIntegrationCreateIn ServiceIntegrationCreateRequestBody type ServiceIntegrationCreateIn struct { - DestEndpointId *string `json:"dest_endpoint_id,omitempty"` - DestProject *string `json:"dest_project,omitempty"` - DestService *string `json:"dest_service,omitempty"` - IntegrationType IntegrationType `json:"integration_type"` - SourceEndpointId *string `json:"source_endpoint_id,omitempty"` - SourceProject *string `json:"source_project,omitempty"` - SourceService *string `json:"source_service,omitempty"` - UserConfig *map[string]any `json:"user_config,omitempty"` + DestEndpointId *string `json:"dest_endpoint_id,omitempty"` // Integration destination endpoint ID + DestProject *string `json:"dest_project,omitempty"` // Destination project name + DestService *string `json:"dest_service,omitempty"` // Destination service name + IntegrationType IntegrationType `json:"integration_type"` // Service integration type + SourceEndpointId *string `json:"source_endpoint_id,omitempty"` // Integration source endpoint ID + SourceProject *string `json:"source_project,omitempty"` // Source project name + SourceService *string `json:"source_service,omitempty"` // Source service name + UserConfig *map[string]any `json:"user_config,omitempty"` // Service type-specific settings } + +// ServiceIntegrationCreateOut Service integration type ServiceIntegrationCreateOut struct { - Active bool `json:"active"` - Description string `json:"description"` - DestEndpoint *string `json:"dest_endpoint,omitempty"` - DestEndpointId *string `json:"dest_endpoint_id,omitempty"` - DestProject string `json:"dest_project"` - DestService *string `json:"dest_service,omitempty"` - DestServiceType string `json:"dest_service_type"` - Enabled bool `json:"enabled"` - IntegrationStatus *IntegrationStatusOut `json:"integration_status,omitempty"` - IntegrationType string `json:"integration_type"` - ServiceIntegrationId string `json:"service_integration_id"` - SourceEndpoint *string `json:"source_endpoint,omitempty"` - SourceEndpointId *string `json:"source_endpoint_id,omitempty"` - SourceProject string `json:"source_project"` - SourceService string `json:"source_service"` - SourceServiceType string `json:"source_service_type"` - UserConfig map[string]any `json:"user_config,omitempty"` + Active bool `json:"active"` // True when integration is active + Description string `json:"description"` // Description of the integration + DestEndpoint *string `json:"dest_endpoint,omitempty"` // Destination endpoint name + DestEndpointId *string `json:"dest_endpoint_id,omitempty"` // Destination endpoint id + DestProject string `json:"dest_project"` // Project name + DestService *string `json:"dest_service,omitempty"` // Destination service name + DestServiceType string `json:"dest_service_type"` // Service type code + Enabled bool `json:"enabled"` // True when integration is enabled + IntegrationStatus *IntegrationStatusOut `json:"integration_status,omitempty"` // Integration status + IntegrationType string `json:"integration_type"` // Type of the integration + ServiceIntegrationId string `json:"service_integration_id"` // Integration ID + SourceEndpoint *string `json:"source_endpoint,omitempty"` // Source endpoint name + SourceEndpointId *string `json:"source_endpoint_id,omitempty"` // Source endpoint ID + SourceProject string `json:"source_project"` // Project name + SourceService string `json:"source_service"` // Source service name + SourceServiceType string `json:"source_service_type"` // Service type code + UserConfig map[string]any `json:"user_config,omitempty"` // Service integration settings } + +// ServiceIntegrationEndpointCreateIn ServiceIntegrationEndpointCreateRequestBody type ServiceIntegrationEndpointCreateIn struct { - EndpointName string `json:"endpoint_name"` - EndpointType EndpointType `json:"endpoint_type"` - UserConfig map[string]any `json:"user_config"` + EndpointName string `json:"endpoint_name"` // Integration endpoint name + EndpointType EndpointType `json:"endpoint_type"` // Service integration endpoint type + UserConfig map[string]any `json:"user_config"` // Service integration endpoint settings } + +// ServiceIntegrationEndpointCreateOut Service integration endpoint type ServiceIntegrationEndpointCreateOut struct { - EndpointConfig map[string]any `json:"endpoint_config"` - EndpointId string `json:"endpoint_id"` - EndpointName string `json:"endpoint_name"` - EndpointType EndpointType `json:"endpoint_type"` - UserConfig map[string]any `json:"user_config"` + EndpointConfig map[string]any `json:"endpoint_config"` // Service integration endpoint backend settings + EndpointId string `json:"endpoint_id"` // Integration endpoint ID + EndpointName string `json:"endpoint_name"` // Integration endpoint name + EndpointType EndpointType `json:"endpoint_type"` // Integration endpoint type + UserConfig map[string]any `json:"user_config"` // Service integration endpoint settings } + +// ServiceIntegrationEndpointGetOut Service integration endpoint type ServiceIntegrationEndpointGetOut struct { - EndpointConfig map[string]any `json:"endpoint_config"` - EndpointId string `json:"endpoint_id"` - EndpointName string `json:"endpoint_name"` - EndpointType EndpointType `json:"endpoint_type"` - UserConfig map[string]any `json:"user_config"` + EndpointConfig map[string]any `json:"endpoint_config"` // Service integration endpoint backend settings + EndpointId string `json:"endpoint_id"` // Integration endpoint ID + EndpointName string `json:"endpoint_name"` // Integration endpoint name + EndpointType EndpointType `json:"endpoint_type"` // Integration endpoint type + UserConfig map[string]any `json:"user_config"` // Service integration endpoint settings } type ServiceIntegrationEndpointOut struct { - EndpointConfig map[string]any `json:"endpoint_config"` - EndpointId string `json:"endpoint_id"` - EndpointName string `json:"endpoint_name"` - EndpointType EndpointType `json:"endpoint_type"` - UserConfig map[string]any `json:"user_config"` + EndpointConfig map[string]any `json:"endpoint_config"` // Service integration endpoint backend settings + EndpointId string `json:"endpoint_id"` // Integration endpoint ID + EndpointName string `json:"endpoint_name"` // Integration endpoint name + EndpointType EndpointType `json:"endpoint_type"` // Integration endpoint type + UserConfig map[string]any `json:"user_config"` // Service integration endpoint settings } + +// ServiceIntegrationEndpointUpdateIn ServiceIntegrationEndpointUpdateRequestBody type ServiceIntegrationEndpointUpdateIn struct { - UserConfig map[string]any `json:"user_config"` + UserConfig map[string]any `json:"user_config"` // Service integration endpoint settings } + +// ServiceIntegrationEndpointUpdateOut Service integration endpoint type ServiceIntegrationEndpointUpdateOut struct { - EndpointConfig map[string]any `json:"endpoint_config"` - EndpointId string `json:"endpoint_id"` - EndpointName string `json:"endpoint_name"` - EndpointType EndpointType `json:"endpoint_type"` - UserConfig map[string]any `json:"user_config"` + EndpointConfig map[string]any `json:"endpoint_config"` // Service integration endpoint backend settings + EndpointId string `json:"endpoint_id"` // Integration endpoint ID + EndpointName string `json:"endpoint_name"` // Integration endpoint name + EndpointType EndpointType `json:"endpoint_type"` // Integration endpoint type + UserConfig map[string]any `json:"user_config"` // Service integration endpoint settings } + +// ServiceIntegrationGetOut Service integration type ServiceIntegrationGetOut struct { - Active bool `json:"active"` - Description string `json:"description"` - DestEndpoint *string `json:"dest_endpoint,omitempty"` - DestEndpointId *string `json:"dest_endpoint_id,omitempty"` - DestProject string `json:"dest_project"` - DestService *string `json:"dest_service,omitempty"` - DestServiceType string `json:"dest_service_type"` - Enabled bool `json:"enabled"` - IntegrationStatus *IntegrationStatusOut `json:"integration_status,omitempty"` - IntegrationType string `json:"integration_type"` - ServiceIntegrationId string `json:"service_integration_id"` - SourceEndpoint *string `json:"source_endpoint,omitempty"` - SourceEndpointId *string `json:"source_endpoint_id,omitempty"` - SourceProject string `json:"source_project"` - SourceService string `json:"source_service"` - SourceServiceType string `json:"source_service_type"` - UserConfig map[string]any `json:"user_config,omitempty"` + Active bool `json:"active"` // True when integration is active + Description string `json:"description"` // Description of the integration + DestEndpoint *string `json:"dest_endpoint,omitempty"` // Destination endpoint name + DestEndpointId *string `json:"dest_endpoint_id,omitempty"` // Destination endpoint id + DestProject string `json:"dest_project"` // Project name + DestService *string `json:"dest_service,omitempty"` // Destination service name + DestServiceType string `json:"dest_service_type"` // Service type code + Enabled bool `json:"enabled"` // True when integration is enabled + IntegrationStatus *IntegrationStatusOut `json:"integration_status,omitempty"` // Integration status + IntegrationType string `json:"integration_type"` // Type of the integration + ServiceIntegrationId string `json:"service_integration_id"` // Integration ID + SourceEndpoint *string `json:"source_endpoint,omitempty"` // Source endpoint name + SourceEndpointId *string `json:"source_endpoint_id,omitempty"` // Source endpoint ID + SourceProject string `json:"source_project"` // Project name + SourceService string `json:"source_service"` // Source service name + SourceServiceType string `json:"source_service_type"` // Service type code + UserConfig map[string]any `json:"user_config,omitempty"` // Service integration settings } type ServiceIntegrationOut struct { - Active bool `json:"active"` - Description string `json:"description"` - DestEndpoint *string `json:"dest_endpoint,omitempty"` - DestEndpointId *string `json:"dest_endpoint_id,omitempty"` - DestProject string `json:"dest_project"` - DestService *string `json:"dest_service,omitempty"` - DestServiceType string `json:"dest_service_type"` - Enabled bool `json:"enabled"` - IntegrationStatus *IntegrationStatusOut `json:"integration_status,omitempty"` - IntegrationType string `json:"integration_type"` - ServiceIntegrationId string `json:"service_integration_id"` - SourceEndpoint *string `json:"source_endpoint,omitempty"` - SourceEndpointId *string `json:"source_endpoint_id,omitempty"` - SourceProject string `json:"source_project"` - SourceService string `json:"source_service"` - SourceServiceType string `json:"source_service_type"` - UserConfig map[string]any `json:"user_config,omitempty"` + Active bool `json:"active"` // True when integration is active + Description string `json:"description"` // Description of the integration + DestEndpoint *string `json:"dest_endpoint,omitempty"` // Destination endpoint name + DestEndpointId *string `json:"dest_endpoint_id,omitempty"` // Destination endpoint id + DestProject string `json:"dest_project"` // Project name + DestService *string `json:"dest_service,omitempty"` // Destination service name + DestServiceType string `json:"dest_service_type"` // Service type code + Enabled bool `json:"enabled"` // True when integration is enabled + IntegrationStatus *IntegrationStatusOut `json:"integration_status,omitempty"` // Integration status + IntegrationType string `json:"integration_type"` // Type of the integration + ServiceIntegrationId string `json:"service_integration_id"` // Integration ID + SourceEndpoint *string `json:"source_endpoint,omitempty"` // Source endpoint name + SourceEndpointId *string `json:"source_endpoint_id,omitempty"` // Source endpoint ID + SourceProject string `json:"source_project"` // Project name + SourceService string `json:"source_service"` // Source service name + SourceServiceType string `json:"source_service_type"` // Service type code + UserConfig map[string]any `json:"user_config,omitempty"` // Service integration settings } + +// ServiceIntegrationUpdateIn ServiceIntegrationUpdateRequestBody type ServiceIntegrationUpdateIn struct { - UserConfig map[string]any `json:"user_config"` + UserConfig map[string]any `json:"user_config"` // Service integration settings } + +// ServiceIntegrationUpdateOut Service integration type ServiceIntegrationUpdateOut struct { - Active bool `json:"active"` - Description string `json:"description"` - DestEndpoint *string `json:"dest_endpoint,omitempty"` - DestEndpointId *string `json:"dest_endpoint_id,omitempty"` - DestProject string `json:"dest_project"` - DestService *string `json:"dest_service,omitempty"` - DestServiceType string `json:"dest_service_type"` - Enabled bool `json:"enabled"` - IntegrationStatus *IntegrationStatusOut `json:"integration_status,omitempty"` - IntegrationType string `json:"integration_type"` - ServiceIntegrationId string `json:"service_integration_id"` - SourceEndpoint *string `json:"source_endpoint,omitempty"` - SourceEndpointId *string `json:"source_endpoint_id,omitempty"` - SourceProject string `json:"source_project"` - SourceService string `json:"source_service"` - SourceServiceType string `json:"source_service_type"` - UserConfig map[string]any `json:"user_config,omitempty"` + Active bool `json:"active"` // True when integration is active + Description string `json:"description"` // Description of the integration + DestEndpoint *string `json:"dest_endpoint,omitempty"` // Destination endpoint name + DestEndpointId *string `json:"dest_endpoint_id,omitempty"` // Destination endpoint id + DestProject string `json:"dest_project"` // Project name + DestService *string `json:"dest_service,omitempty"` // Destination service name + DestServiceType string `json:"dest_service_type"` // Service type code + Enabled bool `json:"enabled"` // True when integration is enabled + IntegrationStatus *IntegrationStatusOut `json:"integration_status,omitempty"` // Integration status + IntegrationType string `json:"integration_type"` // Type of the integration + ServiceIntegrationId string `json:"service_integration_id"` // Integration ID + SourceEndpoint *string `json:"source_endpoint,omitempty"` // Source endpoint name + SourceEndpointId *string `json:"source_endpoint_id,omitempty"` // Source endpoint ID + SourceProject string `json:"source_project"` // Project name + SourceService string `json:"source_service"` // Source service name + SourceServiceType string `json:"source_service_type"` // Service type code + UserConfig map[string]any `json:"user_config,omitempty"` // Service integration settings } + +// StateOut Service integration state type StateOut struct { Errors []string `json:"errors"` - LikelyErrorCause LikelyErrorCauseType `json:"likely_error_cause,omitempty"` + LikelyErrorCause LikelyErrorCauseType `json:"likely_error_cause,omitempty"` // Most likely cause of the errors Nodes map[string]any `json:"nodes"` - Status IntegrationStatusType `json:"status"` + Status IntegrationStatusType `json:"status"` // Service integration status } + +// serviceIntegrationCreateOut ServiceIntegrationCreateResponse type serviceIntegrationCreateOut struct { - ServiceIntegration ServiceIntegrationCreateOut `json:"service_integration"` + ServiceIntegration ServiceIntegrationCreateOut `json:"service_integration"` // Service integration } + +// serviceIntegrationEndpointCreateOut ServiceIntegrationEndpointCreateResponse type serviceIntegrationEndpointCreateOut struct { - ServiceIntegrationEndpoint ServiceIntegrationEndpointCreateOut `json:"service_integration_endpoint"` + ServiceIntegrationEndpoint ServiceIntegrationEndpointCreateOut `json:"service_integration_endpoint"` // Service integration endpoint } + +// serviceIntegrationEndpointGetOut ServiceIntegrationEndpointGetResponse type serviceIntegrationEndpointGetOut struct { - ServiceIntegrationEndpoint ServiceIntegrationEndpointGetOut `json:"service_integration_endpoint"` + ServiceIntegrationEndpoint ServiceIntegrationEndpointGetOut `json:"service_integration_endpoint"` // Service integration endpoint } + +// serviceIntegrationEndpointListOut ServiceIntegrationEndpointListResponse type serviceIntegrationEndpointListOut struct { - ServiceIntegrationEndpoints []ServiceIntegrationEndpointOut `json:"service_integration_endpoints"` + ServiceIntegrationEndpoints []ServiceIntegrationEndpointOut `json:"service_integration_endpoints"` // List of service integrations } + +// serviceIntegrationEndpointTypesOut ServiceIntegrationEndpointTypesResponse type serviceIntegrationEndpointTypesOut struct { - EndpointTypes []EndpointTypeOut `json:"endpoint_types"` + EndpointTypes []EndpointTypeOut `json:"endpoint_types"` // List of service integration endpoint types } + +// serviceIntegrationEndpointUpdateOut ServiceIntegrationEndpointUpdateResponse type serviceIntegrationEndpointUpdateOut struct { - ServiceIntegrationEndpoint ServiceIntegrationEndpointUpdateOut `json:"service_integration_endpoint"` + ServiceIntegrationEndpoint ServiceIntegrationEndpointUpdateOut `json:"service_integration_endpoint"` // Service integration endpoint } + +// serviceIntegrationGetOut ServiceIntegrationGetResponse type serviceIntegrationGetOut struct { - ServiceIntegration ServiceIntegrationGetOut `json:"service_integration"` + ServiceIntegration ServiceIntegrationGetOut `json:"service_integration"` // Service integration } + +// serviceIntegrationListOut ServiceIntegrationListResponse type serviceIntegrationListOut struct { - ServiceIntegrations []ServiceIntegrationOut `json:"service_integrations"` + ServiceIntegrations []ServiceIntegrationOut `json:"service_integrations"` // List of service integrations in current project for a service } + +// serviceIntegrationTypesOut ServiceIntegrationTypesResponse type serviceIntegrationTypesOut struct { - IntegrationTypes []IntegrationTypeOut `json:"integration_types"` + IntegrationTypes []IntegrationTypeOut `json:"integration_types"` // List of service integration types } + +// serviceIntegrationUpdateOut ServiceIntegrationUpdateResponse type serviceIntegrationUpdateOut struct { - ServiceIntegration ServiceIntegrationUpdateOut `json:"service_integration"` + ServiceIntegration ServiceIntegrationUpdateOut `json:"service_integration"` // Service integration } diff --git a/handler/serviceuser/serviceuser.go b/handler/serviceuser/serviceuser.go index ab58b02..9f9cb7b 100644 --- a/handler/serviceuser/serviceuser.go +++ b/handler/serviceuser/serviceuser.go @@ -107,39 +107,58 @@ func (h *ServiceUserHandler) ServiceUserGet(ctx context.Context, project string, return &out.User, nil } +/* +AccessControlIn Service specific access controls for user + +Service type specific access control rules for user. Currently only used for configuring user ACLs for Redis version 6 and above. +*/ type AccessControlIn struct { - DragonflyAclCategories *[]string `json:"dragonfly_acl_categories,omitempty"` - DragonflyAclCommands *[]string `json:"dragonfly_acl_commands,omitempty"` - DragonflyAclKeys *[]string `json:"dragonfly_acl_keys,omitempty"` - M3Group *string `json:"m3_group,omitempty"` - PgAllowReplication *bool `json:"pg_allow_replication,omitempty"` - RedisAclCategories *[]string `json:"redis_acl_categories,omitempty"` - RedisAclChannels *[]string `json:"redis_acl_channels,omitempty"` - RedisAclCommands *[]string `json:"redis_acl_commands,omitempty"` - RedisAclKeys *[]string `json:"redis_acl_keys,omitempty"` -} + DragonflyAclCategories *[]string `json:"dragonfly_acl_categories,omitempty"` // Command category rules + DragonflyAclCommands *[]string `json:"dragonfly_acl_commands,omitempty"` // Rules for individual commands + DragonflyAclKeys *[]string `json:"dragonfly_acl_keys,omitempty"` // Key access rules + M3Group *string `json:"m3_group,omitempty"` // M3 access group to associate users with + PgAllowReplication *bool `json:"pg_allow_replication,omitempty"` // Enable REPLICATION role option + RedisAclCategories *[]string `json:"redis_acl_categories,omitempty"` // Command category rules + RedisAclChannels *[]string `json:"redis_acl_channels,omitempty"` /* + Permitted pub/sub channel patterns + + Glob-style patterns defining which pub/sub channels can be accessed. If array is not defined, the default policy is used (allchannels). + */ + RedisAclCommands *[]string `json:"redis_acl_commands,omitempty"` // Rules for individual commands + RedisAclKeys *[]string `json:"redis_acl_keys,omitempty"` // Key access rules +} + +/* +AccessControlOut Service specific access controls for user + +Service type specific access control rules for user. Currently only used for configuring user ACLs for Redis version 6 and above. +*/ type AccessControlOut struct { - DragonflyAclCategories []string `json:"dragonfly_acl_categories,omitempty"` - DragonflyAclCommands []string `json:"dragonfly_acl_commands,omitempty"` - DragonflyAclKeys []string `json:"dragonfly_acl_keys,omitempty"` - M3Group *string `json:"m3_group,omitempty"` - PgAllowReplication *bool `json:"pg_allow_replication,omitempty"` - RedisAclCategories []string `json:"redis_acl_categories,omitempty"` - RedisAclChannels []string `json:"redis_acl_channels,omitempty"` - RedisAclCommands []string `json:"redis_acl_commands,omitempty"` - RedisAclKeys []string `json:"redis_acl_keys,omitempty"` + DragonflyAclCategories []string `json:"dragonfly_acl_categories,omitempty"` // Command category rules + DragonflyAclCommands []string `json:"dragonfly_acl_commands,omitempty"` // Rules for individual commands + DragonflyAclKeys []string `json:"dragonfly_acl_keys,omitempty"` // Key access rules + M3Group *string `json:"m3_group,omitempty"` // M3 access group to associate users with + PgAllowReplication *bool `json:"pg_allow_replication,omitempty"` // Enable REPLICATION role option + RedisAclCategories []string `json:"redis_acl_categories,omitempty"` // Command category rules + RedisAclChannels []string `json:"redis_acl_channels,omitempty"` /* + Permitted pub/sub channel patterns + + Glob-style patterns defining which pub/sub channels can be accessed. If array is not defined, the default policy is used (allchannels). + */ + RedisAclCommands []string `json:"redis_acl_commands,omitempty"` // Rules for individual commands + RedisAclKeys []string `json:"redis_acl_keys,omitempty"` // Key access rules } type AclOut struct { - Id *string `json:"id,omitempty"` - Permission PermissionType `json:"permission"` - Topic string `json:"topic"` + Id *string `json:"id,omitempty"` // ID + Permission PermissionType `json:"permission"` // Kafka permission + Topic string `json:"topic"` // Topic name pattern Username string `json:"username"` } type AdditionalRegionOut struct { - Cloud string `json:"cloud"` - PauseReason *string `json:"pause_reason,omitempty"` - Paused *bool `json:"paused,omitempty"` - Region *string `json:"region,omitempty"` + Cloud string `json:"cloud"` // Target cloud + PauseReason *string `json:"pause_reason,omitempty"` // Reason for pausing the backup synchronization + Paused *bool `json:"paused,omitempty"` // Indicates additional backup synchronization is paused + Region *string `json:"region,omitempty"` // Cloud storage region name } type AuthenticationType string @@ -154,31 +173,31 @@ func AuthenticationTypeChoices() []string { } type BackupOut struct { - AdditionalRegions []AdditionalRegionOut `json:"additional_regions,omitempty"` - BackupName string `json:"backup_name"` - BackupTime time.Time `json:"backup_time"` - DataSize int `json:"data_size"` - StorageLocation *string `json:"storage_location,omitempty"` + AdditionalRegions []AdditionalRegionOut `json:"additional_regions,omitempty"` // Additional backup regions, if available + BackupName string `json:"backup_name"` // Internal name of this backup + BackupTime time.Time `json:"backup_time"` // Backup timestamp (ISO 8601) + DataSize int `json:"data_size"` // Backup's original size before compression + StorageLocation *string `json:"storage_location,omitempty"` // Location where this backup is stored } type ComponentOut struct { - Component string `json:"component"` - Host string `json:"host"` - KafkaAuthenticationMethod KafkaAuthenticationMethodType `json:"kafka_authentication_method,omitempty"` - KafkaSslCa KafkaSslCaType `json:"kafka_ssl_ca,omitempty"` - Path *string `json:"path,omitempty"` - Port int `json:"port"` - PrivatelinkConnectionId *string `json:"privatelink_connection_id,omitempty"` - Route RouteType `json:"route"` - Ssl *bool `json:"ssl,omitempty"` - Usage UsageType `json:"usage"` + Component string `json:"component"` // Service component name + Host string `json:"host"` // DNS name for connecting to the service component + KafkaAuthenticationMethod KafkaAuthenticationMethodType `json:"kafka_authentication_method,omitempty"` // Kafka authentication method. This is a value specific to the 'kafka' service component + KafkaSslCa KafkaSslCaType `json:"kafka_ssl_ca,omitempty"` // Specifies if this port uses Project CA or Letsencrypt. If not specified, the default is using Project CA.This is a value specific to the 'kafka' service component. + Path *string `json:"path,omitempty"` // Path component of the service URL (useful only if service component is HTTP or HTTPS endpoint) + Port int `json:"port"` // Port number for connecting to the service component + PrivatelinkConnectionId *string `json:"privatelink_connection_id,omitempty"` // Privatelink connection ID + Route RouteType `json:"route"` // Network access route + Ssl *bool `json:"ssl,omitempty"` // Whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted andthis property is only included for service components that may disable encryption. + Usage UsageType `json:"usage"` // DNS usage name } type ConnectionPoolOut struct { - ConnectionUri string `json:"connection_uri"` - Database string `json:"database"` - PoolMode PoolModeType `json:"pool_mode"` - PoolName string `json:"pool_name"` - PoolSize int `json:"pool_size"` - Username *string `json:"username,omitempty"` + ConnectionUri string `json:"connection_uri"` // Connection URI for the DB pool + Database string `json:"database"` // Database name + PoolMode PoolModeType `json:"pool_mode"` // PGBouncer pool mode + PoolName string `json:"pool_name"` // Connection pool name + PoolSize int `json:"pool_size"` // Size of PGBouncer's PostgreSQL side connection pool + Username *string `json:"username,omitempty"` // Pool username } type DowType string @@ -197,9 +216,10 @@ func DowTypeChoices() []string { return []string{"monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday", "never"} } +// IntegrationStatusOut Integration status type IntegrationStatusOut struct { - State StateOut `json:"state"` - StatusUserDesc string `json:"status_user_desc"` + State StateOut `json:"state"` // Service integration state + StatusUserDesc string `json:"status_user_desc"` // Integration status description } type IntegrationStatusType string @@ -262,24 +282,27 @@ func LikelyErrorCauseTypeChoices() []string { return []string{"null", "destination", "integration", "source", "unknown"} } +// MaintenanceOut Automatic maintenance settings type MaintenanceOut struct { - Dow DowType `json:"dow"` - Time string `json:"time"` - Updates []UpdateOut `json:"updates"` + Dow DowType `json:"dow"` // Day of week for installing updates + Time string `json:"time"` // Time for installing updates, UTC + Updates []UpdateOut `json:"updates"` // List of updates waiting to be installed } + +// MetadataOut Notification metadata type MetadataOut struct { - EndOfLifeHelpArticleUrl *string `json:"end_of_life_help_article_url,omitempty"` - EndOfLifePolicyUrl *string `json:"end_of_life_policy_url,omitempty"` - ServiceEndOfLifeTime *time.Time `json:"service_end_of_life_time,omitempty"` - UpgradeToServiceType *string `json:"upgrade_to_service_type,omitempty"` - UpgradeToVersion *string `json:"upgrade_to_version,omitempty"` + EndOfLifeHelpArticleUrl *string `json:"end_of_life_help_article_url,omitempty"` // Link to the help article + EndOfLifePolicyUrl *string `json:"end_of_life_policy_url,omitempty"` // Link to the help article + ServiceEndOfLifeTime *time.Time `json:"service_end_of_life_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC + UpgradeToServiceType *string `json:"upgrade_to_service_type,omitempty"` // If the customer takes no action, the service is updated to this service type when end of life is reached on the Aiven platform. If it is the same as the service type, the platform only upgrades the version. + UpgradeToVersion *string `json:"upgrade_to_version,omitempty"` // The version to which the service will be updated at the end of life on the Aiven platform if the user does not take any action } type NodeStateOut struct { - Name string `json:"name"` - ProgressUpdates []ProgressUpdateOut `json:"progress_updates,omitempty"` - Role RoleType `json:"role,omitempty"` - Shard *ShardOut `json:"shard,omitempty"` - State NodeStateType `json:"state"` + Name string `json:"name"` // Name of the service node + ProgressUpdates []ProgressUpdateOut `json:"progress_updates,omitempty"` // Extra information regarding the progress for current state + Role RoleType `json:"role,omitempty"` // Role of this node. Only returned for a subset of service types + Shard *ShardOut `json:"shard,omitempty"` // Shard of this node. Only returned for a subset of service types + State NodeStateType `json:"state"` // Current state of the service node } type NodeStateType string @@ -358,12 +381,12 @@ func PoolModeTypeChoices() []string { } type ProgressUpdateOut struct { - Completed bool `json:"completed"` - Current *int `json:"current,omitempty"` - Max *int `json:"max,omitempty"` - Min *int `json:"min,omitempty"` - Phase PhaseType `json:"phase"` - Unit UnitType `json:"unit,omitempty"` + Completed bool `json:"completed"` // Indicates whether this phase has been completed or not + Current *int `json:"current,omitempty"` // Current progress for this phase. May be missing or null. + Max *int `json:"max,omitempty"` // Maximum progress value for this phase. May be missing or null. May change. + Min *int `json:"min,omitempty"` // Minimum progress value for this phase. May be missing or null. + Phase PhaseType `json:"phase"` // Key identifying this phase + Unit UnitType `json:"unit,omitempty"` // Unit for current/min/max values. New units may be added. If null should be treated as generic unit } type RoleType string @@ -391,35 +414,35 @@ func RouteTypeChoices() []string { } type SchemaRegistryAclOut struct { - Id *string `json:"id,omitempty"` - Permission PermissionTypeAlt `json:"permission"` - Resource string `json:"resource"` + Id *string `json:"id,omitempty"` // ID + Permission PermissionTypeAlt `json:"permission"` // ACL entry for Schema Registry + Resource string `json:"resource"` // Schema Registry ACL entry resource name pattern Username string `json:"username"` } type ServiceIntegrationOut struct { - Active bool `json:"active"` - Description string `json:"description"` - DestEndpoint *string `json:"dest_endpoint,omitempty"` - DestEndpointId *string `json:"dest_endpoint_id,omitempty"` - DestProject string `json:"dest_project"` - DestService *string `json:"dest_service,omitempty"` - DestServiceType string `json:"dest_service_type"` - Enabled bool `json:"enabled"` - IntegrationStatus *IntegrationStatusOut `json:"integration_status,omitempty"` - IntegrationType string `json:"integration_type"` - ServiceIntegrationId string `json:"service_integration_id"` - SourceEndpoint *string `json:"source_endpoint,omitempty"` - SourceEndpointId *string `json:"source_endpoint_id,omitempty"` - SourceProject string `json:"source_project"` - SourceService string `json:"source_service"` - SourceServiceType string `json:"source_service_type"` - UserConfig map[string]any `json:"user_config,omitempty"` + Active bool `json:"active"` // True when integration is active + Description string `json:"description"` // Description of the integration + DestEndpoint *string `json:"dest_endpoint,omitempty"` // Destination endpoint name + DestEndpointId *string `json:"dest_endpoint_id,omitempty"` // Destination endpoint id + DestProject string `json:"dest_project"` // Project name + DestService *string `json:"dest_service,omitempty"` // Destination service name + DestServiceType string `json:"dest_service_type"` // Service type code + Enabled bool `json:"enabled"` // True when integration is enabled + IntegrationStatus *IntegrationStatusOut `json:"integration_status,omitempty"` // Integration status + IntegrationType string `json:"integration_type"` // Type of the integration + ServiceIntegrationId string `json:"service_integration_id"` // Integration ID + SourceEndpoint *string `json:"source_endpoint,omitempty"` // Source endpoint name + SourceEndpointId *string `json:"source_endpoint_id,omitempty"` // Source endpoint ID + SourceProject string `json:"source_project"` // Project name + SourceService string `json:"source_service"` // Source service name + SourceServiceType string `json:"source_service_type"` // Service type code + UserConfig map[string]any `json:"user_config,omitempty"` // Service integration settings } type ServiceNotificationOut struct { - Level LevelType `json:"level"` - Message string `json:"message"` - Metadata MetadataOut `json:"metadata"` - Type ServiceNotificationType `json:"type"` + Level LevelType `json:"level"` // Notification level + Message string `json:"message"` // Human notification message + Metadata MetadataOut `json:"metadata"` // Notification metadata + Type ServiceNotificationType `json:"type"` // Notification type } type ServiceNotificationType string @@ -445,137 +468,168 @@ func ServiceStateTypeChoices() []string { return []string{"POWEROFF", "REBALANCING", "REBUILDING", "RUNNING"} } +// ServiceUserCreateIn ServiceUserCreateRequestBody type ServiceUserCreateIn struct { - AccessControl *AccessControlIn `json:"access_control,omitempty"` - Authentication AuthenticationType `json:"authentication,omitempty"` - Username string `json:"username"` + AccessControl *AccessControlIn `json:"access_control,omitempty"` /* + Service specific access controls for user + + Service type specific access control rules for user. Currently only used for configuring user ACLs for Redis version 6 and above. + */ + Authentication AuthenticationType `json:"authentication,omitempty"` // Authentication details + Username string `json:"username"` // Service username } + +// ServiceUserCreateOut Service user account type ServiceUserCreateOut struct { - AccessCert *string `json:"access_cert,omitempty"` - AccessCertNotValidAfterTime *time.Time `json:"access_cert_not_valid_after_time,omitempty"` - AccessControl *AccessControlOut `json:"access_control,omitempty"` - AccessKey *string `json:"access_key,omitempty"` - Authentication AuthenticationType `json:"authentication,omitempty"` - ExpiringCertNotValidAfterTime *time.Time `json:"expiring_cert_not_valid_after_time,omitempty"` - Password string `json:"password"` - Type string `json:"type"` - Username string `json:"username"` -} + AccessCert *string `json:"access_cert,omitempty"` // Access certificate for TLS client authentication + AccessCertNotValidAfterTime *time.Time `json:"access_cert_not_valid_after_time,omitempty"` // Validity end time (ISO8601) for the current access certificate + AccessControl *AccessControlOut `json:"access_control,omitempty"` /* + Service specific access controls for user + + Service type specific access control rules for user. Currently only used for configuring user ACLs for Redis version 6 and above. + */ + AccessKey *string `json:"access_key,omitempty"` // Access key for TLS client authentication + Authentication AuthenticationType `json:"authentication,omitempty"` // Authentication details + ExpiringCertNotValidAfterTime *time.Time `json:"expiring_cert_not_valid_after_time,omitempty"` // Validity end time (ISO8601) for the expiring access certificate + Password string `json:"password"` // Account password. A null value indicates a user overridden password. + Type string `json:"type"` // Account type + Username string `json:"username"` // Account username +} + +// ServiceUserCredentialsModifyIn ServiceUserCredentialsModifyRequestBody type ServiceUserCredentialsModifyIn struct { - AccessControl *AccessControlIn `json:"access_control,omitempty"` - Authentication AuthenticationType `json:"authentication,omitempty"` - NewPassword *string `json:"new_password,omitempty"` - Operation OperationType `json:"operation"` + AccessControl *AccessControlIn `json:"access_control,omitempty"` /* + Service specific access controls for user + + Service type specific access control rules for user. Currently only used for configuring user ACLs for Redis version 6 and above. + */ + Authentication AuthenticationType `json:"authentication,omitempty"` // Authentication details + NewPassword *string `json:"new_password,omitempty"` // New password + Operation OperationType `json:"operation"` // Operation type } + +// ServiceUserCredentialsModifyOut Service information type ServiceUserCredentialsModifyOut struct { - Acl []AclOut `json:"acl,omitempty"` - Backups []BackupOut `json:"backups,omitempty"` - CloudDescription *string `json:"cloud_description,omitempty"` - CloudName string `json:"cloud_name"` - Components []ComponentOut `json:"components,omitempty"` - ConnectionInfo map[string]any `json:"connection_info,omitempty"` - ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` - CreateTime time.Time `json:"create_time"` - Databases []string `json:"databases,omitempty"` - DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` - Features map[string]any `json:"features,omitempty"` - GroupList []string `json:"group_list"` - Maintenance *MaintenanceOut `json:"maintenance,omitempty"` - Metadata map[string]any `json:"metadata,omitempty"` - NodeCount *int `json:"node_count,omitempty"` - NodeCpuCount *int `json:"node_cpu_count,omitempty"` - NodeMemoryMb *float64 `json:"node_memory_mb,omitempty"` - NodeStates []NodeStateOut `json:"node_states,omitempty"` - Plan string `json:"plan"` - ProjectVpcId string `json:"project_vpc_id"` - SchemaRegistryAcl []SchemaRegistryAclOut `json:"schema_registry_acl,omitempty"` - ServiceIntegrations []ServiceIntegrationOut `json:"service_integrations"` - ServiceName string `json:"service_name"` - ServiceNotifications []ServiceNotificationOut `json:"service_notifications,omitempty"` - ServiceType string `json:"service_type"` - ServiceTypeDescription *string `json:"service_type_description,omitempty"` - ServiceUri string `json:"service_uri"` - ServiceUriParams map[string]any `json:"service_uri_params,omitempty"` - State ServiceStateType `json:"state"` - Tags map[string]string `json:"tags,omitempty"` - TechEmails []TechEmailOut `json:"tech_emails,omitempty"` - TerminationProtection bool `json:"termination_protection"` - Topics []TopicOut `json:"topics,omitempty"` - UpdateTime time.Time `json:"update_time"` - UserConfig map[string]any `json:"user_config"` - Users []UserOut `json:"users,omitempty"` -} + Acl []AclOut `json:"acl,omitempty"` // List of Kafka ACL entries + Backups []BackupOut `json:"backups,omitempty"` // List of backups for the service + CloudDescription *string `json:"cloud_description,omitempty"` // Cloud provider and location + CloudName string `json:"cloud_name"` // Target cloud + Components []ComponentOut `json:"components,omitempty"` // Service component information objects + ConnectionInfo map[string]any `json:"connection_info,omitempty"` // Service-specific connection information properties + ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` // PostgreSQL PGBouncer connection pools + CreateTime time.Time `json:"create_time"` // Service creation timestamp (ISO 8601) + Databases []string `json:"databases,omitempty"` // List of service's user database names + DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` // Megabytes of disk space for data storage + Features map[string]any `json:"features,omitempty"` // Feature flags + GroupList []string `json:"group_list"` // List of service groups the service belongs to. This field is deprecated. It is always set to single element with value 'default' + Maintenance *MaintenanceOut `json:"maintenance,omitempty"` // Automatic maintenance settings + Metadata map[string]any `json:"metadata,omitempty"` // Service type specific metadata + NodeCount *int `json:"node_count,omitempty"` // Number of service nodes in the active plan + NodeCpuCount *int `json:"node_cpu_count,omitempty"` // Number of CPUs for each node + NodeMemoryMb *float64 `json:"node_memory_mb,omitempty"` // Megabytes of memory for each node + NodeStates []NodeStateOut `json:"node_states,omitempty"` // State of individual service nodes + Plan string `json:"plan"` // Subscription plan + ProjectVpcId string `json:"project_vpc_id"` // Project VPC ID + SchemaRegistryAcl []SchemaRegistryAclOut `json:"schema_registry_acl,omitempty"` // List of Schema Registry ACL entries + ServiceIntegrations []ServiceIntegrationOut `json:"service_integrations"` // Integrations with other services + ServiceName string `json:"service_name"` // Service name + ServiceNotifications []ServiceNotificationOut `json:"service_notifications,omitempty"` // Service notifications + ServiceType string `json:"service_type"` // Service type code + ServiceTypeDescription *string `json:"service_type_description,omitempty"` // Single line description of the service + ServiceUri string `json:"service_uri"` // URI for connecting to the service (may be null) + ServiceUriParams map[string]any `json:"service_uri_params,omitempty"` // service_uri parameterized into key-value pairs + State ServiceStateType `json:"state"` // State of the service + Tags map[string]string `json:"tags,omitempty"` // Set of resource tags + TechEmails []TechEmailOut `json:"tech_emails,omitempty"` // List of service technical email addresses + TerminationProtection bool `json:"termination_protection"` // Service is protected against termination and powering off + Topics []TopicOut `json:"topics,omitempty"` // Kafka topics. DEPRECATED: Use /project/$project/service/$service/topic instead + UpdateTime time.Time `json:"update_time"` // Service last update timestamp (ISO 8601) + UserConfig map[string]any `json:"user_config"` // Service type-specific settings + Users []UserOut `json:"users,omitempty"` // List of service users +} + +// ServiceUserCredentialsResetOut Service information type ServiceUserCredentialsResetOut struct { - Acl []AclOut `json:"acl,omitempty"` - Backups []BackupOut `json:"backups,omitempty"` - CloudDescription *string `json:"cloud_description,omitempty"` - CloudName string `json:"cloud_name"` - Components []ComponentOut `json:"components,omitempty"` - ConnectionInfo map[string]any `json:"connection_info,omitempty"` - ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` - CreateTime time.Time `json:"create_time"` - Databases []string `json:"databases,omitempty"` - DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` - Features map[string]any `json:"features,omitempty"` - GroupList []string `json:"group_list"` - Maintenance *MaintenanceOut `json:"maintenance,omitempty"` - Metadata map[string]any `json:"metadata,omitempty"` - NodeCount *int `json:"node_count,omitempty"` - NodeCpuCount *int `json:"node_cpu_count,omitempty"` - NodeMemoryMb *float64 `json:"node_memory_mb,omitempty"` - NodeStates []NodeStateOut `json:"node_states,omitempty"` - Plan string `json:"plan"` - ProjectVpcId string `json:"project_vpc_id"` - SchemaRegistryAcl []SchemaRegistryAclOut `json:"schema_registry_acl,omitempty"` - ServiceIntegrations []ServiceIntegrationOut `json:"service_integrations"` - ServiceName string `json:"service_name"` - ServiceNotifications []ServiceNotificationOut `json:"service_notifications,omitempty"` - ServiceType string `json:"service_type"` - ServiceTypeDescription *string `json:"service_type_description,omitempty"` - ServiceUri string `json:"service_uri"` - ServiceUriParams map[string]any `json:"service_uri_params,omitempty"` - State ServiceStateType `json:"state"` - Tags map[string]string `json:"tags,omitempty"` - TechEmails []TechEmailOut `json:"tech_emails,omitempty"` - TerminationProtection bool `json:"termination_protection"` - Topics []TopicOut `json:"topics,omitempty"` - UpdateTime time.Time `json:"update_time"` - UserConfig map[string]any `json:"user_config"` - Users []UserOut `json:"users,omitempty"` -} + Acl []AclOut `json:"acl,omitempty"` // List of Kafka ACL entries + Backups []BackupOut `json:"backups,omitempty"` // List of backups for the service + CloudDescription *string `json:"cloud_description,omitempty"` // Cloud provider and location + CloudName string `json:"cloud_name"` // Target cloud + Components []ComponentOut `json:"components,omitempty"` // Service component information objects + ConnectionInfo map[string]any `json:"connection_info,omitempty"` // Service-specific connection information properties + ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` // PostgreSQL PGBouncer connection pools + CreateTime time.Time `json:"create_time"` // Service creation timestamp (ISO 8601) + Databases []string `json:"databases,omitempty"` // List of service's user database names + DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` // Megabytes of disk space for data storage + Features map[string]any `json:"features,omitempty"` // Feature flags + GroupList []string `json:"group_list"` // List of service groups the service belongs to. This field is deprecated. It is always set to single element with value 'default' + Maintenance *MaintenanceOut `json:"maintenance,omitempty"` // Automatic maintenance settings + Metadata map[string]any `json:"metadata,omitempty"` // Service type specific metadata + NodeCount *int `json:"node_count,omitempty"` // Number of service nodes in the active plan + NodeCpuCount *int `json:"node_cpu_count,omitempty"` // Number of CPUs for each node + NodeMemoryMb *float64 `json:"node_memory_mb,omitempty"` // Megabytes of memory for each node + NodeStates []NodeStateOut `json:"node_states,omitempty"` // State of individual service nodes + Plan string `json:"plan"` // Subscription plan + ProjectVpcId string `json:"project_vpc_id"` // Project VPC ID + SchemaRegistryAcl []SchemaRegistryAclOut `json:"schema_registry_acl,omitempty"` // List of Schema Registry ACL entries + ServiceIntegrations []ServiceIntegrationOut `json:"service_integrations"` // Integrations with other services + ServiceName string `json:"service_name"` // Service name + ServiceNotifications []ServiceNotificationOut `json:"service_notifications,omitempty"` // Service notifications + ServiceType string `json:"service_type"` // Service type code + ServiceTypeDescription *string `json:"service_type_description,omitempty"` // Single line description of the service + ServiceUri string `json:"service_uri"` // URI for connecting to the service (may be null) + ServiceUriParams map[string]any `json:"service_uri_params,omitempty"` // service_uri parameterized into key-value pairs + State ServiceStateType `json:"state"` // State of the service + Tags map[string]string `json:"tags,omitempty"` // Set of resource tags + TechEmails []TechEmailOut `json:"tech_emails,omitempty"` // List of service technical email addresses + TerminationProtection bool `json:"termination_protection"` // Service is protected against termination and powering off + Topics []TopicOut `json:"topics,omitempty"` // Kafka topics. DEPRECATED: Use /project/$project/service/$service/topic instead + UpdateTime time.Time `json:"update_time"` // Service last update timestamp (ISO 8601) + UserConfig map[string]any `json:"user_config"` // Service type-specific settings + Users []UserOut `json:"users,omitempty"` // List of service users +} + +// ServiceUserGetOut Service user account type ServiceUserGetOut struct { - AccessCert *string `json:"access_cert,omitempty"` - AccessCertNotValidAfterTime *time.Time `json:"access_cert_not_valid_after_time,omitempty"` - AccessControl *AccessControlOut `json:"access_control,omitempty"` - AccessKey *string `json:"access_key,omitempty"` - Authentication AuthenticationType `json:"authentication,omitempty"` - ExpiringCertNotValidAfterTime *time.Time `json:"expiring_cert_not_valid_after_time,omitempty"` - Password string `json:"password"` - Type string `json:"type"` - Username string `json:"username"` -} + AccessCert *string `json:"access_cert,omitempty"` // Access certificate for TLS client authentication + AccessCertNotValidAfterTime *time.Time `json:"access_cert_not_valid_after_time,omitempty"` // Validity end time (ISO8601) for the current access certificate + AccessControl *AccessControlOut `json:"access_control,omitempty"` /* + Service specific access controls for user + + Service type specific access control rules for user. Currently only used for configuring user ACLs for Redis version 6 and above. + */ + AccessKey *string `json:"access_key,omitempty"` // Access key for TLS client authentication + Authentication AuthenticationType `json:"authentication,omitempty"` // Authentication details + ExpiringCertNotValidAfterTime *time.Time `json:"expiring_cert_not_valid_after_time,omitempty"` // Validity end time (ISO8601) for the expiring access certificate + Password string `json:"password"` // Account password. A null value indicates a user overridden password. + Type string `json:"type"` // Account type + Username string `json:"username"` // Account username +} + +// ShardOut Shard of this node. Only returned for a subset of service types type ShardOut struct { - Name *string `json:"name,omitempty"` - Position *int `json:"position,omitempty"` + Name *string `json:"name,omitempty"` // Name of the shard. + Position *int `json:"position,omitempty"` // Position of this shard within the service } + +// StateOut Service integration state type StateOut struct { Errors []string `json:"errors"` - LikelyErrorCause LikelyErrorCauseType `json:"likely_error_cause,omitempty"` + LikelyErrorCause LikelyErrorCauseType `json:"likely_error_cause,omitempty"` // Most likely cause of the errors Nodes map[string]any `json:"nodes"` - Status IntegrationStatusType `json:"status"` + Status IntegrationStatusType `json:"status"` // Service integration status } type TechEmailOut struct { - Email string `json:"email"` + Email string `json:"email"` // User email address } type TopicOut struct { - CleanupPolicy string `json:"cleanup_policy"` - MinInsyncReplicas int `json:"min_insync_replicas"` - Partitions int `json:"partitions"` - Replication int `json:"replication"` - RetentionBytes int `json:"retention_bytes"` - RetentionHours int `json:"retention_hours"` - State TopicStateType `json:"state,omitempty"` - TopicName string `json:"topic_name"` + CleanupPolicy string `json:"cleanup_policy"` // cleanup.policy + MinInsyncReplicas int `json:"min_insync_replicas"` // min.insync.replicas + Partitions int `json:"partitions"` // Number of partitions + Replication int `json:"replication"` // Number of replicas + RetentionBytes int `json:"retention_bytes"` // retention.bytes + RetentionHours int `json:"retention_hours"` // Retention period (hours) + State TopicStateType `json:"state,omitempty"` // Topic state + TopicName string `json:"topic_name"` // Topic name } type TopicStateType string @@ -603,10 +657,10 @@ func UnitTypeChoices() []string { } type UpdateOut struct { - Deadline *string `json:"deadline,omitempty"` - Description *string `json:"description,omitempty"` - StartAfter *string `json:"start_after,omitempty"` - StartAt *time.Time `json:"start_at,omitempty"` + Deadline *string `json:"deadline,omitempty"` // Deadline for installing the update + Description *string `json:"description,omitempty"` // Description of the update + StartAfter *string `json:"start_after,omitempty"` // The earliest time the update will be automatically applied + StartAt *time.Time `json:"start_at,omitempty"` // The time when the update will be automatically applied } type UsageType string @@ -620,25 +674,37 @@ func UsageTypeChoices() []string { } type UserOut struct { - AccessCert *string `json:"access_cert,omitempty"` - AccessCertNotValidAfterTime *time.Time `json:"access_cert_not_valid_after_time,omitempty"` - AccessControl *AccessControlOut `json:"access_control,omitempty"` - AccessKey *string `json:"access_key,omitempty"` - Authentication AuthenticationType `json:"authentication,omitempty"` - ExpiringCertNotValidAfterTime *time.Time `json:"expiring_cert_not_valid_after_time,omitempty"` - Password string `json:"password"` - Type string `json:"type"` - Username string `json:"username"` -} + AccessCert *string `json:"access_cert,omitempty"` // Access certificate for TLS client authentication + AccessCertNotValidAfterTime *time.Time `json:"access_cert_not_valid_after_time,omitempty"` // Validity end time (ISO8601) for the current access certificate + AccessControl *AccessControlOut `json:"access_control,omitempty"` /* + Service specific access controls for user + + Service type specific access control rules for user. Currently only used for configuring user ACLs for Redis version 6 and above. + */ + AccessKey *string `json:"access_key,omitempty"` // Access key for TLS client authentication + Authentication AuthenticationType `json:"authentication,omitempty"` // Authentication details + ExpiringCertNotValidAfterTime *time.Time `json:"expiring_cert_not_valid_after_time,omitempty"` // Validity end time (ISO8601) for the expiring access certificate + Password string `json:"password"` // Account password. A null value indicates a user overridden password. + Type string `json:"type"` // Account type + Username string `json:"username"` // Account username +} + +// serviceUserCreateOut ServiceUserCreateResponse type serviceUserCreateOut struct { - User ServiceUserCreateOut `json:"user"` + User ServiceUserCreateOut `json:"user"` // Service user account } + +// serviceUserCredentialsModifyOut ServiceUserCredentialsModifyResponse type serviceUserCredentialsModifyOut struct { - Service ServiceUserCredentialsModifyOut `json:"service"` + Service ServiceUserCredentialsModifyOut `json:"service"` // Service information } + +// serviceUserCredentialsResetOut ServiceUserCredentialsResetResponse type serviceUserCredentialsResetOut struct { - Service ServiceUserCredentialsResetOut `json:"service"` + Service ServiceUserCredentialsResetOut `json:"service"` // Service information } + +// serviceUserGetOut ServiceUserGetResponse type serviceUserGetOut struct { - User ServiceUserGetOut `json:"user"` + User ServiceUserGetOut `json:"user"` // Service user account } diff --git a/handler/staticip/staticip.go b/handler/staticip/staticip.go index 1c7d2fa..7a210fd 100644 --- a/handler/staticip/staticip.go +++ b/handler/staticip/staticip.go @@ -150,16 +150,19 @@ func (h *StaticIPHandler) StaticIPList(ctx context.Context, project string) ([]S return out.StaticIps, nil } +// ProjectStaticIpassociateIn ProjectStaticIPAssociateRequestBody type ProjectStaticIpassociateIn struct { - ServiceName string `json:"service_name"` + ServiceName string `json:"service_name"` // Service name } + +// ProjectStaticIpassociateOut ProjectStaticIPAssociateResponse type ProjectStaticIpassociateOut struct { - CloudName string `json:"cloud_name"` - IpAddress string `json:"ip_address"` - ServiceName string `json:"service_name"` - State ProjectStaticIpassociateStateType `json:"state"` - StaticIpAddressId string `json:"static_ip_address_id"` - TerminationProtection bool `json:"termination_protection"` + CloudName string `json:"cloud_name"` // Target cloud + IpAddress string `json:"ip_address"` // IPv4 address + ServiceName string `json:"service_name"` // Service name + State ProjectStaticIpassociateStateType `json:"state"` // Static IP address state + StaticIpAddressId string `json:"static_ip_address_id"` // Static IP address identifier + TerminationProtection bool `json:"termination_protection"` // Static IP address is protected against deletion } type ProjectStaticIpassociateStateType string @@ -176,13 +179,14 @@ func ProjectStaticIpassociateStateTypeChoices() []string { return []string{"creating", "created", "available", "assigned", "deleting", "deleted"} } +// ProjectStaticIpdissociateOut ProjectStaticIPDissociateResponse type ProjectStaticIpdissociateOut struct { - CloudName string `json:"cloud_name"` - IpAddress string `json:"ip_address"` - ServiceName string `json:"service_name"` - State ProjectStaticIpdissociateStateType `json:"state"` - StaticIpAddressId string `json:"static_ip_address_id"` - TerminationProtection bool `json:"termination_protection"` + CloudName string `json:"cloud_name"` // Target cloud + IpAddress string `json:"ip_address"` // IPv4 address + ServiceName string `json:"service_name"` // Service name + State ProjectStaticIpdissociateStateType `json:"state"` // Static IP address state + StaticIpAddressId string `json:"static_ip_address_id"` // Static IP address identifier + TerminationProtection bool `json:"termination_protection"` // Static IP address is protected against deletion } type ProjectStaticIpdissociateStateType string @@ -199,16 +203,19 @@ func ProjectStaticIpdissociateStateTypeChoices() []string { return []string{"creating", "created", "available", "assigned", "deleting", "deleted"} } +// ProjectStaticIppatchIn ProjectStaticIPPatchRequestBody type ProjectStaticIppatchIn struct { - TerminationProtection *bool `json:"termination_protection,omitempty"` + TerminationProtection *bool `json:"termination_protection,omitempty"` // Static IP address is protected against deletion } + +// ProjectStaticIppatchOut ProjectStaticIPPatchResponse type ProjectStaticIppatchOut struct { - CloudName string `json:"cloud_name"` - IpAddress string `json:"ip_address"` - ServiceName string `json:"service_name"` - State ProjectStaticIppatchStateType `json:"state"` - StaticIpAddressId string `json:"static_ip_address_id"` - TerminationProtection bool `json:"termination_protection"` + CloudName string `json:"cloud_name"` // Target cloud + IpAddress string `json:"ip_address"` // IPv4 address + ServiceName string `json:"service_name"` // Service name + State ProjectStaticIppatchStateType `json:"state"` // Static IP address state + StaticIpAddressId string `json:"static_ip_address_id"` // Static IP address identifier + TerminationProtection bool `json:"termination_protection"` // Static IP address is protected against deletion } type ProjectStaticIppatchStateType string @@ -226,16 +233,16 @@ func ProjectStaticIppatchStateTypeChoices() []string { } type StaticIpAddressAvailabilityOut struct { - CloudName string `json:"cloud_name"` - PriceUsd string `json:"price_usd"` + CloudName string `json:"cloud_name"` // Target cloud + PriceUsd string `json:"price_usd"` // Hourly static IP address price in this cloud region } type StaticIpOut struct { - CloudName string `json:"cloud_name"` - IpAddress string `json:"ip_address"` - ServiceName string `json:"service_name"` - State StaticIpStateType `json:"state"` - StaticIpAddressId string `json:"static_ip_address_id"` - TerminationProtection bool `json:"termination_protection"` + CloudName string `json:"cloud_name"` // Target cloud + IpAddress string `json:"ip_address"` // IPv4 address + ServiceName string `json:"service_name"` // Service name + State StaticIpStateType `json:"state"` // Static IP address state + StaticIpAddressId string `json:"static_ip_address_id"` // Static IP address identifier + TerminationProtection bool `json:"termination_protection"` // Static IP address is protected against deletion } type StaticIpStateType string @@ -252,17 +259,20 @@ func StaticIpStateTypeChoices() []string { return []string{"creating", "created", "available", "assigned", "deleting", "deleted"} } +// StaticIpcreateIn StaticIPCreateRequestBody type StaticIpcreateIn struct { - CloudName string `json:"cloud_name"` - TerminationProtection *bool `json:"termination_protection,omitempty"` + CloudName string `json:"cloud_name"` // Target cloud + TerminationProtection *bool `json:"termination_protection,omitempty"` // Static IP address is protected against deletion } + +// StaticIpcreateOut StaticIPCreateResponse type StaticIpcreateOut struct { - CloudName string `json:"cloud_name"` - IpAddress string `json:"ip_address"` - ServiceName string `json:"service_name"` - State StaticIpcreateStateType `json:"state"` - StaticIpAddressId string `json:"static_ip_address_id"` - TerminationProtection bool `json:"termination_protection"` + CloudName string `json:"cloud_name"` // Target cloud + IpAddress string `json:"ip_address"` // IPv4 address + ServiceName string `json:"service_name"` // Service name + State StaticIpcreateStateType `json:"state"` // Static IP address state + StaticIpAddressId string `json:"static_ip_address_id"` // Static IP address identifier + TerminationProtection bool `json:"termination_protection"` // Static IP address is protected against deletion } type StaticIpcreateStateType string @@ -279,12 +289,17 @@ func StaticIpcreateStateTypeChoices() []string { return []string{"creating", "created", "available", "assigned", "deleting", "deleted"} } +// projectStaticIpavailabilityListOut ProjectStaticIPAvailabilityListResponse type projectStaticIpavailabilityListOut struct { - StaticIpAddressAvailability []StaticIpAddressAvailabilityOut `json:"static_ip_address_availability"` + StaticIpAddressAvailability []StaticIpAddressAvailabilityOut `json:"static_ip_address_availability"` // Paginated array } + +// publicStaticIpavailabilityListOut PublicStaticIPAvailabilityListResponse type publicStaticIpavailabilityListOut struct { - StaticIpAddressAvailability []StaticIpAddressAvailabilityOut `json:"static_ip_address_availability"` + StaticIpAddressAvailability []StaticIpAddressAvailabilityOut `json:"static_ip_address_availability"` // Paginated array } + +// staticIplistOut StaticIPListResponse type staticIplistOut struct { - StaticIps []StaticIpOut `json:"static_ips"` + StaticIps []StaticIpOut `json:"static_ips"` // Paginated array } diff --git a/handler/thanos/thanos.go b/handler/thanos/thanos.go index e0b5076..0bf1448 100644 --- a/handler/thanos/thanos.go +++ b/handler/thanos/thanos.go @@ -43,17 +43,21 @@ func (h *ThanosHandler) ServiceThanosStorageSummary(ctx context.Context, project } type HourlyOut struct { - EstimatedCost *string `json:"estimated_cost,omitempty"` - HourStart string `json:"hour_start"` - PeakStoredBytes int `json:"peak_stored_bytes"` + EstimatedCost *string `json:"estimated_cost,omitempty"` // The estimated cost in USD of tiered storage for this hour + HourStart string `json:"hour_start"` // Timestamp in ISO 8601 format, always in UTC + PeakStoredBytes int `json:"peak_stored_bytes"` // Peak bytes stored on object storage at this hour } + +// ServiceThanosStorageSummaryOut ServiceThanosStorageSummaryResponse type ServiceThanosStorageSummaryOut struct { - CurrentCost string `json:"current_cost"` - ForecastedCost string `json:"forecasted_cost"` - ForecastedRate *string `json:"forecasted_rate,omitempty"` - StorageUsageHistory StorageUsageHistoryOut `json:"storage_usage_history"` - TotalStorageUsage int `json:"total_storage_usage"` + CurrentCost string `json:"current_cost"` // The current cost in USD of tiered storage since the beginning of the billing period + ForecastedCost string `json:"forecasted_cost"` // The forecasted cost in USD of tiered storage in the billing period + ForecastedRate *string `json:"forecasted_rate,omitempty"` // The rate on GBs/hour used to calculate the forecasted cost + StorageUsageHistory StorageUsageHistoryOut `json:"storage_usage_history"` // History of usage and cumulative costs in the billing period + TotalStorageUsage int `json:"total_storage_usage"` // Total storage usage by tiered storage, in bytes } + +// StorageUsageHistoryOut History of usage and cumulative costs in the billing period type StorageUsageHistoryOut struct { - Hourly []HourlyOut `json:"hourly"` + Hourly []HourlyOut `json:"hourly"` // History by hour } diff --git a/handler/user/user.go b/handler/user/user.go index 3001309..9fb2020 100644 --- a/handler/user/user.go +++ b/handler/user/user.go @@ -421,54 +421,61 @@ func (h *UserHandler) ValidateReferralCode(ctx context.Context, referralCode str return err } +// AccessTokenCreateIn AccessTokenCreateRequestBody type AccessTokenCreateIn struct { - Description string `json:"description"` - ExtendWhenUsed *bool `json:"extend_when_used,omitempty"` - MaxAgeSeconds *float64 `json:"max_age_seconds,omitempty"` - Scopes *[]string `json:"scopes,omitempty"` + Description string `json:"description"` // Name / description of an access token + ExtendWhenUsed *bool `json:"extend_when_used,omitempty"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified. + MaxAgeSeconds *float64 `json:"max_age_seconds,omitempty"` // Time the token remains valid since creation (or since last use if extend_when_used is true) + Scopes *[]string `json:"scopes,omitempty"` // Scopes this token is restricted to, if specified } + +// AccessTokenCreateOut AccessTokenCreateResponse type AccessTokenCreateOut struct { - CreateTime time.Time `json:"create_time"` - CreatedManually bool `json:"created_manually"` - CurrentlyActive *bool `json:"currently_active,omitempty"` - Description *string `json:"description,omitempty"` - ExpiryTime *time.Time `json:"expiry_time,omitempty"` - ExtendWhenUsed bool `json:"extend_when_used"` - FullToken string `json:"full_token"` - LastIp *string `json:"last_ip,omitempty"` - LastUsedTime *time.Time `json:"last_used_time,omitempty"` - LastUserAgent *string `json:"last_user_agent,omitempty"` - LastUserAgentHumanReadable *string `json:"last_user_agent_human_readable,omitempty"` - MaxAgeSeconds float64 `json:"max_age_seconds"` - Scopes []string `json:"scopes,omitempty"` - TokenPrefix string `json:"token_prefix"` -} + CreateTime time.Time `json:"create_time"` // Timestamp when the access token was created + CreatedManually bool `json:"created_manually"` // True for tokens explicitly created via the access_tokens API, false for tokens created via login. + CurrentlyActive *bool `json:"currently_active,omitempty"` // true if API request was made with this access token + Description *string `json:"description,omitempty"` // Name / description of an access token + ExpiryTime *time.Time `json:"expiry_time,omitempty"` // Timestamp when the access token will expire unless extended, if ever + ExtendWhenUsed bool `json:"extend_when_used"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified. + FullToken string `json:"full_token"` // This full access token can be used to make API calls. This can also be used to update or revoke tokens. Note that when using this token with the update and revoke APIs it must be URL encoded because it may contain /, + and = characters (/ => %2F, + => %2B, = => %3D). + LastIp *string `json:"last_ip,omitempty"` // IP address the access token was last used from in case it has ever been used + LastUsedTime *time.Time `json:"last_used_time,omitempty"` // Timestamp when the access token was last used, if ever + LastUserAgent *string `json:"last_user_agent,omitempty"` // User agent string of the client that last used the token in case it has ever been used + LastUserAgentHumanReadable *string `json:"last_user_agent_human_readable,omitempty"` // Human readable user agent string of the client that last used the token in case user agent is known + MaxAgeSeconds float64 `json:"max_age_seconds"` // Time the token remains valid since creation (or since last use if extend_when_used is true) + Scopes []string `json:"scopes,omitempty"` // Scopes this token is restricted to, if specified + TokenPrefix string `json:"token_prefix"` // First characters of the actual token value. Full value is only exposed after creation. This value is used when updating or revoking tokens. Note that the value may contain /, + and = characters and must be URL encoded when used (/ => %2F, + => %2B, = => %3D). +} + +// AccessTokenUpdateIn AccessTokenUpdateRequestBody type AccessTokenUpdateIn struct { - Description string `json:"description"` + Description string `json:"description"` // Name / description of an access token } + +// AccessTokenUpdateOut AccessTokenUpdateResponse type AccessTokenUpdateOut struct { - CreateTime time.Time `json:"create_time"` - CreatedManually *bool `json:"created_manually,omitempty"` - CurrentlyActive *bool `json:"currently_active,omitempty"` - Description *string `json:"description,omitempty"` - ExpiryTime *time.Time `json:"expiry_time,omitempty"` - ExtendWhenUsed bool `json:"extend_when_used"` - LastIp *string `json:"last_ip,omitempty"` - LastUsedTime *time.Time `json:"last_used_time,omitempty"` - LastUserAgent *string `json:"last_user_agent,omitempty"` - LastUserAgentHumanReadable *string `json:"last_user_agent_human_readable,omitempty"` - MaxAgeSeconds float64 `json:"max_age_seconds"` - Scopes []string `json:"scopes,omitempty"` - TokenPrefix string `json:"token_prefix"` + CreateTime time.Time `json:"create_time"` // Timestamp when the access token was created + CreatedManually *bool `json:"created_manually,omitempty"` // True for tokens explicitly created via the access_tokens API, false for tokens created via login. + CurrentlyActive *bool `json:"currently_active,omitempty"` // true if API request was made with this access token + Description *string `json:"description,omitempty"` // Name / description of an access token + ExpiryTime *time.Time `json:"expiry_time,omitempty"` // Timestamp when the access token will expire unless extended, if ever + ExtendWhenUsed bool `json:"extend_when_used"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified. + LastIp *string `json:"last_ip,omitempty"` // IP address the access token was last used from in case it has ever been used + LastUsedTime *time.Time `json:"last_used_time,omitempty"` // Timestamp when the access token was last used, if ever + LastUserAgent *string `json:"last_user_agent,omitempty"` // User agent string of the client that last used the token in case it has ever been used + LastUserAgentHumanReadable *string `json:"last_user_agent_human_readable,omitempty"` // Human readable user agent string of the client that last used the token in case user agent is known + MaxAgeSeconds float64 `json:"max_age_seconds"` // Time the token remains valid since creation (or since last use if extend_when_used is true) + Scopes []string `json:"scopes,omitempty"` // Scopes this token is restricted to, if specified + TokenPrefix string `json:"token_prefix"` // First characters of the actual token value. Full value is only exposed after creation. This value is used when updating or revoking tokens. Note that the value may contain /, + and = characters and must be URL encoded when used (/ => %2F, + => %2B, = => %3D). } type AccountInviteOut struct { - AccountId string `json:"account_id"` - AccountName string `json:"account_name"` - CreateTime time.Time `json:"create_time"` - InvitedByUserEmail string `json:"invited_by_user_email"` - TeamId string `json:"team_id"` - TeamName string `json:"team_name"` - UserEmail string `json:"user_email"` + AccountId string `json:"account_id"` // Account ID + AccountName string `json:"account_name"` // Account name + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + InvitedByUserEmail string `json:"invited_by_user_email"` // User email address + TeamId string `json:"team_id"` // Team ID + TeamName string `json:"team_name"` // Team name + UserEmail string `json:"user_email"` // User email address } type ActionType string @@ -500,18 +507,18 @@ func AnyTypeChoices() []string { } type AuthenticationMethodOut struct { - AuthenticationMethodAccountId string `json:"authentication_method_account_id"` - CreateTime time.Time `json:"create_time"` - CurrentlyActive bool `json:"currently_active"` - DeleteTime time.Time `json:"delete_time"` - LastUsedTime time.Time `json:"last_used_time"` - MethodId string `json:"method_id"` - Name *string `json:"name,omitempty"` - PublicRemoteIdentity string `json:"public_remote_identity"` - RemoteProviderId string `json:"remote_provider_id"` - State AuthenticationMethodStateType `json:"state"` - UpdateTime time.Time `json:"update_time"` - UserEmail string `json:"user_email"` + AuthenticationMethodAccountId string `json:"authentication_method_account_id"` // Account ID + CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC + CurrentlyActive bool `json:"currently_active"` // true if API was accessed with this authentication method + DeleteTime time.Time `json:"delete_time"` // Timestamp in ISO 8601 format, always in UTC + LastUsedTime time.Time `json:"last_used_time"` // Timestamp in ISO 8601 format, always in UTC + MethodId string `json:"method_id"` // Unique ID for authentication method + Name *string `json:"name,omitempty"` // Authentication method name + PublicRemoteIdentity string `json:"public_remote_identity"` // Identity on remote provider, if available. May be email address, but not necessarily. + RemoteProviderId string `json:"remote_provider_id"` // Provider ID + State AuthenticationMethodStateType `json:"state"` // State for authentication method + UpdateTime time.Time `json:"update_time"` // Timestamp in ISO 8601 format, always in UTC + UserEmail string `json:"user_email"` // User email address } type AuthenticationMethodStateType string @@ -524,34 +531,43 @@ func AuthenticationMethodStateTypeChoices() []string { return []string{"active", "deleted"} } +// CheckPasswordStrengthExistingUserIn CheckPasswordStrengthExistingUserRequestBody type CheckPasswordStrengthExistingUserIn struct { - NewPassword string `json:"new_password"` - OldPassword string `json:"old_password"` + NewPassword string `json:"new_password"` // New password + OldPassword string `json:"old_password"` // User password } + +// CheckPasswordStrengthExistingUserOut Password strength type CheckPasswordStrengthExistingUserOut struct { - IsAcceptable *bool `json:"is_acceptable,omitempty"` - Message string `json:"message"` - Score int `json:"score"` + IsAcceptable *bool `json:"is_acceptable,omitempty"` // True if the password is acceptable + Message string `json:"message"` // Password strength message + Score int `json:"score"` // Password strength score } + +// CheckPasswordStrengthNewUserIn CheckPasswordStrengthNewUserRequestBody type CheckPasswordStrengthNewUserIn struct { - Email *string `json:"email,omitempty"` - Password string `json:"password"` - RealName *string `json:"real_name,omitempty"` + Email *string `json:"email,omitempty"` // User email address + Password string `json:"password"` // New password + RealName *string `json:"real_name,omitempty"` // User real name } + +// CheckPasswordStrengthNewUserOut Password strength type CheckPasswordStrengthNewUserOut struct { - IsAcceptable *bool `json:"is_acceptable,omitempty"` - Message string `json:"message"` - Score int `json:"score"` + IsAcceptable *bool `json:"is_acceptable,omitempty"` // True if the password is acceptable + Message string `json:"message"` // Password strength message + Score int `json:"score"` // Password strength score } + +// IntercomOut Intercom settings type IntercomOut struct { - AppId string `json:"app_id"` - Hmac string `json:"hmac"` + AppId string `json:"app_id"` // Intercom application ID + Hmac string `json:"hmac"` // Intercom authentication HMAC } type InvitationOut struct { - InviteCode string `json:"invite_code"` - InviteTime time.Time `json:"invite_time"` - InvitingUserEmail string `json:"inviting_user_email"` - ProjectName string `json:"project_name"` + InviteCode string `json:"invite_code"` // Code for accepting the invitation + InviteTime time.Time `json:"invite_time"` // Timestamp in ISO 8601 format, always in UTC + InvitingUserEmail string `json:"inviting_user_email"` // User email address + ProjectName string `json:"project_name"` // Project name } type MethodType string @@ -564,170 +580,227 @@ func MethodTypeChoices() []string { return []string{"POST", "GET"} } +// ProjectMembershipOut Project membership and type of membership type ProjectMembershipOut struct { - Any AnyType `json:"ANY,omitempty"` + Any AnyType `json:"ANY,omitempty"` // Project member type } + +// ProjectMembershipsOut List of project membership and type of membership type ProjectMembershipsOut struct { - Any []string `json:"ANY,omitempty"` + Any []string `json:"ANY,omitempty"` // List of project member type } type TokenOut struct { - CreateTime time.Time `json:"create_time"` - CreatedManually bool `json:"created_manually"` - CurrentlyActive *bool `json:"currently_active,omitempty"` - Description *string `json:"description,omitempty"` - ExpiryTime *time.Time `json:"expiry_time,omitempty"` - ExtendWhenUsed bool `json:"extend_when_used"` - LastIp *string `json:"last_ip,omitempty"` - LastUsedTime *time.Time `json:"last_used_time,omitempty"` - LastUserAgent *string `json:"last_user_agent,omitempty"` - LastUserAgentHumanReadable *string `json:"last_user_agent_human_readable,omitempty"` - MaxAgeSeconds float64 `json:"max_age_seconds"` - Scopes []string `json:"scopes,omitempty"` - TokenPrefix string `json:"token_prefix"` -} + CreateTime time.Time `json:"create_time"` // Timestamp when the access token was created + CreatedManually bool `json:"created_manually"` // True for tokens explicitly created via the access_tokens API, false for tokens created via login. + CurrentlyActive *bool `json:"currently_active,omitempty"` // true if API request was made with this access token + Description *string `json:"description,omitempty"` // Name / description of an access token + ExpiryTime *time.Time `json:"expiry_time,omitempty"` // Timestamp when the access token will expire unless extended, if ever + ExtendWhenUsed bool `json:"extend_when_used"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified. + LastIp *string `json:"last_ip,omitempty"` // IP address the access token was last used from in case it has ever been used + LastUsedTime *time.Time `json:"last_used_time,omitempty"` // Timestamp when the access token was last used, if ever + LastUserAgent *string `json:"last_user_agent,omitempty"` // User agent string of the client that last used the token in case it has ever been used + LastUserAgentHumanReadable *string `json:"last_user_agent_human_readable,omitempty"` // Human readable user agent string of the client that last used the token in case user agent is known + MaxAgeSeconds float64 `json:"max_age_seconds"` // Time the token remains valid since creation (or since last use if extend_when_used is true) + Scopes []string `json:"scopes,omitempty"` // Scopes this token is restricted to, if specified + TokenPrefix string `json:"token_prefix"` // First characters of the actual token value. Full value is only exposed after creation. This value is used when updating or revoking tokens. Note that the value may contain /, + and = characters and must be URL encoded when used (/ => %2F, + => %2B, = => %3D). +} + +// TwoFactorAuthConfigureIn TwoFactorAuthConfigureRequestBody type TwoFactorAuthConfigureIn struct { - Method string `json:"method"` - Password string `json:"password"` + Method string `json:"method"` // Two-factor authentication method being used, if any + Password string `json:"password"` // Current password } + +// TwoFactorAuthConfigureOtpIn TwoFactorAuthConfigureOTPRequestBody type TwoFactorAuthConfigureOtpIn struct { - Otp string `json:"otp"` - Password string `json:"password"` - Uri string `json:"uri"` + Otp string `json:"otp"` // One-time password + Password string `json:"password"` // Current password + Uri string `json:"uri"` // URI describing the TOTP } + +// TwoFactorAuthConfigureOtpOut TwoFactorAuthConfigureOTPResponse type TwoFactorAuthConfigureOtpOut struct { - Method string `json:"method"` - Token string `json:"token"` + Method string `json:"method"` // Two-factor authentication method being used, if any + Token string `json:"token"` // New API session authentication token when configuration is complete } + +// TwoFactorAuthConfigureOut TwoFactorAuthConfigureResponse type TwoFactorAuthConfigureOut struct { - Method string `json:"method"` - Qrcode *string `json:"qrcode,omitempty"` - Uri *string `json:"uri,omitempty"` + Method string `json:"method"` // Two-factor authentication method being used, if any + Qrcode *string `json:"qrcode,omitempty"` // QR code describing the TOTP as a base64-encoded PNG + Uri *string `json:"uri,omitempty"` // URI describing the TOTP } + +// UserAccountInvitesAcceptIn UserAccountInvitesAcceptRequestBody type UserAccountInvitesAcceptIn struct { - AccountId string `json:"account_id"` - TeamId *string `json:"team_id,omitempty"` + AccountId string `json:"account_id"` // Account ID + TeamId *string `json:"team_id,omitempty"` // Team ID } + +// UserAuthIn UserAuthRequestBody type UserAuthIn struct { - Email string `json:"email"` - Otp *string `json:"otp,omitempty"` - Password string `json:"password"` + Email string `json:"email"` // User email address + Otp *string `json:"otp,omitempty"` // One-time password + Password string `json:"password"` // User password } + +// UserAuthLoginOptionsIn UserAuthLoginOptionsRequestBody type UserAuthLoginOptionsIn struct { - Email *string `json:"email,omitempty"` + Email *string `json:"email,omitempty"` // User email address } + +// UserAuthLoginOptionsOut UserAuthLoginOptionsResponse type UserAuthLoginOptionsOut struct { - None []map[string]any `json:"None,omitempty"` - Action ActionType `json:"action"` - Method MethodType `json:"method,omitempty"` - Name *string `json:"name,omitempty"` - RedirectUrl *string `json:"redirect_url,omitempty"` + None []map[string]any `json:"None,omitempty"` // List of available login methods + Action ActionType `json:"action"` // Action + Method MethodType `json:"method,omitempty"` // HTTP method used for redirecting + Name *string `json:"name,omitempty"` // Human readable name + RedirectUrl *string `json:"redirect_url,omitempty"` // Redirect URL for signing in } + +// UserAuthOut UserAuthResponse type UserAuthOut struct { - ReturnUrl *string `json:"return_url,omitempty"` - State string `json:"state"` - Token string `json:"token"` - UserEmail string `json:"user_email"` + ReturnUrl *string `json:"return_url,omitempty"` // Return URL + State string `json:"state"` // User account state + Token string `json:"token"` // API session authentication token + UserEmail string `json:"user_email"` // User email address } type UserGroupOut struct { - CreateTime time.Time `json:"create_time"` + CreateTime time.Time `json:"create_time"` // User group creation time Description string `json:"description"` - ManagedByScim bool `json:"managed_by_scim"` - UpdateTime time.Time `json:"update_time"` - UserGroupId string `json:"user_group_id"` - UserGroupName string `json:"user_group_name"` + ManagedByScim bool `json:"managed_by_scim"` // Managed By Scim + UpdateTime time.Time `json:"update_time"` // User group last update time + UserGroupId string `json:"user_group_id"` // User Group ID + UserGroupName string `json:"user_group_name"` // User Group Name } + +// UserInfoOut User information type UserInfoOut struct { - Auth []string `json:"auth"` + Auth []string `json:"auth"` // List of user's required authentication methods City *string `json:"city,omitempty"` - Country *string `json:"country,omitempty"` - CreateTime *time.Time `json:"create_time,omitempty"` - Department *string `json:"department,omitempty"` - Features map[string]any `json:"features,omitempty"` - Intercom IntercomOut `json:"intercom"` - Invitations []InvitationOut `json:"invitations"` - JobTitle *string `json:"job_title,omitempty"` - ManagedByScim *bool `json:"managed_by_scim,omitempty"` - ManagingOrganizationId *string `json:"managing_organization_id,omitempty"` - ProjectMembership ProjectMembershipOut `json:"project_membership"` - ProjectMemberships *ProjectMembershipsOut `json:"project_memberships,omitempty"` - Projects []string `json:"projects"` - RealName string `json:"real_name"` - State string `json:"state"` - TokenValidityBegin *string `json:"token_validity_begin,omitempty"` - User string `json:"user"` - UserId string `json:"user_id"` -} + Country *string `json:"country,omitempty"` // Country code ISO 3166-1 alpha-2 + CreateTime *time.Time `json:"create_time,omitempty"` // User registration time + Department *string `json:"department,omitempty"` // Job department + Features map[string]any `json:"features,omitempty"` // Feature flags + Intercom IntercomOut `json:"intercom"` // Intercom settings + Invitations []InvitationOut `json:"invitations"` // List of pending invitations + JobTitle *string `json:"job_title,omitempty"` // Job title + ManagedByScim *bool `json:"managed_by_scim,omitempty"` // User management status + ManagingOrganizationId *string `json:"managing_organization_id,omitempty"` // Organization ID + ProjectMembership ProjectMembershipOut `json:"project_membership"` // Project membership and type of membership + ProjectMemberships *ProjectMembershipsOut `json:"project_memberships,omitempty"` // List of project membership and type of membership + Projects []string `json:"projects"` // List of projects the user is a member of + RealName string `json:"real_name"` // User real name + State string `json:"state"` // User account state + TokenValidityBegin *string `json:"token_validity_begin,omitempty"` // Earliest valid authentication token timestamp + User string `json:"user"` // User email address + UserId string `json:"user_id"` // User ID +} + +// UserPasswordChangeIn UserPasswordChangeRequestBody type UserPasswordChangeIn struct { - NewPassword string `json:"new_password"` - Password string `json:"password"` + NewPassword string `json:"new_password"` // New password + Password string `json:"password"` // Current password } + +// UserPasswordResetIn UserPasswordResetRequestBody type UserPasswordResetIn struct { - NewPassword string `json:"new_password"` + NewPassword string `json:"new_password"` // New password } + +// UserPasswordResetRequestIn UserPasswordResetRequestRequestBody type UserPasswordResetRequestIn struct { - Email string `json:"email"` + Email string `json:"email"` // User email address } + +// UserUpdateIn UserUpdateRequestBody type UserUpdateIn struct { City *string `json:"city,omitempty"` - Country *string `json:"country,omitempty"` - Department *string `json:"department,omitempty"` - JobTitle *string `json:"job_title,omitempty"` - RealName string `json:"real_name"` + Country *string `json:"country,omitempty"` // Country code ISO 3166-1 alpha-2 + Department *string `json:"department,omitempty"` // Job department + JobTitle *string `json:"job_title,omitempty"` // Job title + RealName string `json:"real_name"` // User real name } + +// UserUpdateOut User information type UserUpdateOut struct { - Auth []string `json:"auth"` + Auth []string `json:"auth"` // List of user's required authentication methods City *string `json:"city,omitempty"` - Country *string `json:"country,omitempty"` - CreateTime *time.Time `json:"create_time,omitempty"` - Department *string `json:"department,omitempty"` - Features map[string]any `json:"features,omitempty"` - Intercom IntercomOut `json:"intercom"` - Invitations []InvitationOut `json:"invitations"` - JobTitle *string `json:"job_title,omitempty"` - ManagedByScim *bool `json:"managed_by_scim,omitempty"` - ManagingOrganizationId *string `json:"managing_organization_id,omitempty"` - ProjectMembership ProjectMembershipOut `json:"project_membership"` - ProjectMemberships *ProjectMembershipsOut `json:"project_memberships,omitempty"` - Projects []string `json:"projects"` - RealName string `json:"real_name"` - State string `json:"state"` - TokenValidityBegin *string `json:"token_validity_begin,omitempty"` - User string `json:"user"` - UserId string `json:"user_id"` -} + Country *string `json:"country,omitempty"` // Country code ISO 3166-1 alpha-2 + CreateTime *time.Time `json:"create_time,omitempty"` // User registration time + Department *string `json:"department,omitempty"` // Job department + Features map[string]any `json:"features,omitempty"` // Feature flags + Intercom IntercomOut `json:"intercom"` // Intercom settings + Invitations []InvitationOut `json:"invitations"` // List of pending invitations + JobTitle *string `json:"job_title,omitempty"` // Job title + ManagedByScim *bool `json:"managed_by_scim,omitempty"` // User management status + ManagingOrganizationId *string `json:"managing_organization_id,omitempty"` // Organization ID + ProjectMembership ProjectMembershipOut `json:"project_membership"` // Project membership and type of membership + ProjectMemberships *ProjectMembershipsOut `json:"project_memberships,omitempty"` // List of project membership and type of membership + Projects []string `json:"projects"` // List of projects the user is a member of + RealName string `json:"real_name"` // User real name + State string `json:"state"` // User account state + TokenValidityBegin *string `json:"token_validity_begin,omitempty"` // Earliest valid authentication token timestamp + User string `json:"user"` // User email address + UserId string `json:"user_id"` // User ID +} + +// UserVerifyEmailOut Details of verified invite type UserVerifyEmailOut struct { - UserEmail string `json:"user_email"` + UserEmail string `json:"user_email"` // User email address } + +// accessTokenListOut AccessTokenListResponse type accessTokenListOut struct { - Tokens []TokenOut `json:"tokens"` + Tokens []TokenOut `json:"tokens"` // List of access tokens } + +// checkPasswordStrengthExistingUserOut CheckPasswordStrengthExistingUserResponse type checkPasswordStrengthExistingUserOut struct { - PasswordStrength CheckPasswordStrengthExistingUserOut `json:"password_strength"` + PasswordStrength CheckPasswordStrengthExistingUserOut `json:"password_strength"` // Password strength } + +// checkPasswordStrengthNewUserOut CheckPasswordStrengthNewUserResponse type checkPasswordStrengthNewUserOut struct { - PasswordStrength CheckPasswordStrengthNewUserOut `json:"password_strength"` + PasswordStrength CheckPasswordStrengthNewUserOut `json:"password_strength"` // Password strength } + +// organizationMemberGroupsListOut OrganizationMemberGroupsListResponse type organizationMemberGroupsListOut struct { - UserGroups []UserGroupOut `json:"user_groups"` + UserGroups []UserGroupOut `json:"user_groups"` // User Groups } + +// userAccountInvitesAcceptOut UserAccountInvitesAcceptResponse type userAccountInvitesAcceptOut struct { - AccountInvites []AccountInviteOut `json:"account_invites"` + AccountInvites []AccountInviteOut `json:"account_invites"` // List of invites } + +// userAccountInvitesListOut UserAccountInvitesListResponse type userAccountInvitesListOut struct { - AccountInvites []AccountInviteOut `json:"account_invites"` + AccountInvites []AccountInviteOut `json:"account_invites"` // List of invites } + +// userAuthenticationMethodsListOut UserAuthenticationMethodsListResponse type userAuthenticationMethodsListOut struct { - AuthenticationMethods []AuthenticationMethodOut `json:"authentication_methods"` + AuthenticationMethods []AuthenticationMethodOut `json:"authentication_methods"` // List of linked authentication methods } + +// userInfoOut UserInfoResponse type userInfoOut struct { - User UserInfoOut `json:"user"` + User UserInfoOut `json:"user"` // User information } + +// userPasswordChangeOut UserPasswordChangeResponse type userPasswordChangeOut struct { - Token string `json:"token"` + Token string `json:"token"` // API session authentication token } + +// userUpdateOut UserUpdateResponse type userUpdateOut struct { - User UserUpdateOut `json:"user"` + User UserUpdateOut `json:"user"` // User information } + +// userVerifyEmailOut UserVerifyEmailResponse type userVerifyEmailOut struct { - InviteDetails UserVerifyEmailOut `json:"invite_details"` + InviteDetails UserVerifyEmailOut `json:"invite_details"` // Details of verified invite } diff --git a/handler/usergroup/usergroup.go b/handler/usergroup/usergroup.go index 7a0e013..5610643 100644 --- a/handler/usergroup/usergroup.go +++ b/handler/usergroup/usergroup.go @@ -136,9 +136,9 @@ func (h *UserGroupHandler) UserGroupsList(ctx context.Context, organizationId st } type MemberOut struct { - LastActivityTime *time.Time `json:"last_activity_time,omitempty"` - UserId string `json:"user_id"` - UserInfo UserInfoOut `json:"user_info"` + LastActivityTime *time.Time `json:"last_activity_time,omitempty"` // Last Activity Time + UserId string `json:"user_id"` // User ID + UserInfo UserInfoOut `json:"user_info"` // OrganizationUserInfo } type OperationType string @@ -151,67 +151,84 @@ func OperationTypeChoices() []string { return []string{"add_members", "remove_members"} } +// UserGroupCreateIn UserGroupCreateRequestBody type UserGroupCreateIn struct { Description string `json:"description"` - UserGroupName string `json:"user_group_name"` + UserGroupName string `json:"user_group_name"` // User Group Name } + +// UserGroupCreateOut UserGroupCreateResponse type UserGroupCreateOut struct { - CreateTime time.Time `json:"create_time"` + CreateTime time.Time `json:"create_time"` // User group creation time Description string `json:"description"` - ManagedByScim bool `json:"managed_by_scim"` - UpdateTime time.Time `json:"update_time"` - UserGroupId string `json:"user_group_id"` - UserGroupName string `json:"user_group_name"` + ManagedByScim bool `json:"managed_by_scim"` // Managed By Scim + UpdateTime time.Time `json:"update_time"` // User group last update time + UserGroupId string `json:"user_group_id"` // User Group ID + UserGroupName string `json:"user_group_name"` // User Group Name } + +// UserGroupGetOut UserGroupGetResponse type UserGroupGetOut struct { - CreateTime time.Time `json:"create_time"` + CreateTime time.Time `json:"create_time"` // User group creation time Description string `json:"description"` - ManagedByScim bool `json:"managed_by_scim"` - UpdateTime time.Time `json:"update_time"` - UserGroupId string `json:"user_group_id"` - UserGroupName string `json:"user_group_name"` + ManagedByScim bool `json:"managed_by_scim"` // Managed By Scim + UpdateTime time.Time `json:"update_time"` // User group last update time + UserGroupId string `json:"user_group_id"` // User Group ID + UserGroupName string `json:"user_group_name"` // User Group Name } + +// UserGroupMembersUpdateIn UserGroupMembersUpdateRequestBody type UserGroupMembersUpdateIn struct { - MemberIds []string `json:"member_ids"` - Operation OperationType `json:"operation"` + MemberIds []string `json:"member_ids"` // List of user IDs to apply the operation on + Operation OperationType `json:"operation"` // Operation to be performed on the group } type UserGroupOut struct { - CreateTime time.Time `json:"create_time"` + CreateTime time.Time `json:"create_time"` // User group creation time Description string `json:"description"` - ManagedByScim bool `json:"managed_by_scim"` - MemberCount int `json:"member_count"` - UpdateTime time.Time `json:"update_time"` - UserGroupId string `json:"user_group_id"` - UserGroupName string `json:"user_group_name"` + ManagedByScim bool `json:"managed_by_scim"` // Managed By Scim + MemberCount int `json:"member_count"` // Member Count + UpdateTime time.Time `json:"update_time"` // User group last update time + UserGroupId string `json:"user_group_id"` // User Group ID + UserGroupName string `json:"user_group_name"` // User Group Name } + +// UserGroupUpdateIn UserGroupUpdateRequestBody type UserGroupUpdateIn struct { Description *string `json:"description,omitempty"` - UserGroupName *string `json:"user_group_name,omitempty"` + UserGroupName *string `json:"user_group_name,omitempty"` // User Group Name } + +// UserGroupUpdateOut UserGroupUpdateResponse type UserGroupUpdateOut struct { - CreateTime time.Time `json:"create_time"` + CreateTime time.Time `json:"create_time"` // User group creation time Description string `json:"description"` - ManagedByScim bool `json:"managed_by_scim"` - UpdateTime time.Time `json:"update_time"` - UserGroupId string `json:"user_group_id"` - UserGroupName string `json:"user_group_name"` + ManagedByScim bool `json:"managed_by_scim"` // Managed By Scim + UpdateTime time.Time `json:"update_time"` // User group last update time + UserGroupId string `json:"user_group_id"` // User Group ID + UserGroupName string `json:"user_group_name"` // User Group Name } + +// UserInfoOut OrganizationUserInfo type UserInfoOut struct { City *string `json:"city,omitempty"` Country *string `json:"country,omitempty"` - CreateTime time.Time `json:"create_time"` + CreateTime time.Time `json:"create_time"` // Creation time Department *string `json:"department,omitempty"` - IsApplicationUser bool `json:"is_application_user"` - JobTitle *string `json:"job_title,omitempty"` - ManagedByScim bool `json:"managed_by_scim"` - ManagingOrganizationId *string `json:"managing_organization_id,omitempty"` - RealName string `json:"real_name"` + IsApplicationUser bool `json:"is_application_user"` // Is Application User + JobTitle *string `json:"job_title,omitempty"` // Job Title + ManagedByScim bool `json:"managed_by_scim"` // Managed By Scim + ManagingOrganizationId *string `json:"managing_organization_id,omitempty"` // Managing Organization ID + RealName string `json:"real_name"` // Real Name State string `json:"state"` - UserEmail string `json:"user_email"` + UserEmail string `json:"user_email"` // User Email } + +// userGroupMemberListOut UserGroupMemberListResponse type userGroupMemberListOut struct { - Members []MemberOut `json:"members"` + Members []MemberOut `json:"members"` // User group members } + +// userGroupsListOut UserGroupsListResponse type userGroupsListOut struct { - UserGroups []UserGroupOut `json:"user_groups"` + UserGroups []UserGroupOut `json:"user_groups"` // User Groups } diff --git a/handler/vpc/vpc.go b/handler/vpc/vpc.go index 7c9e949..c630d61 100644 --- a/handler/vpc/vpc.go +++ b/handler/vpc/vpc.go @@ -188,118 +188,134 @@ func (h *VpcHandler) VpcPeeringConnectionWithResourceGroupDelete(ctx context.Con } type AddIn struct { - Cidr string `json:"cidr"` - PeerCloudAccount string `json:"peer_cloud_account"` - PeerResourceGroup *string `json:"peer_resource_group,omitempty"` - PeerVpc string `json:"peer_vpc"` + Cidr string `json:"cidr"` // IPv4 network range CIDR + PeerCloudAccount string `json:"peer_cloud_account"` // AWS account ID, GCP project ID, Azure subscription ID of the peered VPC, or string "upcloud" for UpCloud peering connections + PeerResourceGroup *string `json:"peer_resource_group,omitempty"` // Azure resource group name of the peered VPC + PeerVpc string `json:"peer_vpc"` // AWS VPC ID, GCP VPC network name, Azure Virtual network name of the peered VPC, or UpCloud VPC ID } type PeeringConnectionIn struct { - PeerAzureAppId *string `json:"peer_azure_app_id,omitempty"` - PeerAzureTenantId *string `json:"peer_azure_tenant_id,omitempty"` - PeerCloudAccount string `json:"peer_cloud_account"` - PeerRegion *string `json:"peer_region,omitempty"` - PeerResourceGroup *string `json:"peer_resource_group,omitempty"` - PeerVpc string `json:"peer_vpc"` - UserPeerNetworkCidrs *[]string `json:"user_peer_network_cidrs,omitempty"` + PeerAzureAppId *string `json:"peer_azure_app_id,omitempty"` // Azure app registration id in UUID4 form that is allowed to create a peering to the peer vnet + PeerAzureTenantId *string `json:"peer_azure_tenant_id,omitempty"` // Azure tenant id in UUID4 form + PeerCloudAccount string `json:"peer_cloud_account"` // AWS account ID, GCP project ID, Azure subscription ID of the peered VPC, or string "upcloud" for UpCloud peering connections + PeerRegion *string `json:"peer_region,omitempty"` // The peer VPC's region on AWS. May be omitted or set to null if the peer is in the same region as the Aiven project VPC. Omit or set to null on GCP, Azure, or UpCloud. + PeerResourceGroup *string `json:"peer_resource_group,omitempty"` // Azure resource group name of the peered VPC + PeerVpc string `json:"peer_vpc"` // AWS VPC ID, GCP VPC network name, Azure Virtual network name of the peered VPC, or UpCloud VPC ID + UserPeerNetworkCidrs *[]string `json:"user_peer_network_cidrs,omitempty"` // List of private IPv4 ranges to route through the peering connection } type PeeringConnectionOut struct { - CreateTime time.Time `json:"create_time"` - PeerAzureAppId string `json:"peer_azure_app_id"` - PeerAzureTenantId string `json:"peer_azure_tenant_id"` - PeerCloudAccount string `json:"peer_cloud_account"` - PeerRegion *string `json:"peer_region,omitempty"` - PeerResourceGroup string `json:"peer_resource_group"` - PeerVpc string `json:"peer_vpc"` - State VpcPeeringConnectionStateType `json:"state"` - StateInfo StateInfoOut `json:"state_info"` - UpdateTime time.Time `json:"update_time"` - UserPeerNetworkCidrs []string `json:"user_peer_network_cidrs"` - VpcPeeringConnectionType VpcPeeringConnectionType `json:"vpc_peering_connection_type"` + CreateTime time.Time `json:"create_time"` // VPC peering connection creation timestamp + PeerAzureAppId string `json:"peer_azure_app_id"` // Azure app registration id in UUID4 form that is allowed to create a peering to the peer vnet + PeerAzureTenantId string `json:"peer_azure_tenant_id"` // Azure tenant id in UUID4 form + PeerCloudAccount string `json:"peer_cloud_account"` // AWS account ID, GCP project ID, Azure subscription ID of the peered VPC, or string "upcloud" for UpCloud peering connections + PeerRegion *string `json:"peer_region,omitempty"` // The peer VPC's region in AWS clouds. Always null in GCP, Azure, or UpCloud clouds + PeerResourceGroup string `json:"peer_resource_group"` // Azure resource group name of the peered VPC + PeerVpc string `json:"peer_vpc"` // AWS VPC ID, GCP VPC network name, Azure Virtual network name of the peered VPC, or UpCloud VPC ID + State VpcPeeringConnectionStateType `json:"state"` // Project VPC peering connection state + StateInfo StateInfoOut `json:"state_info"` // State-specific help or error information + UpdateTime time.Time `json:"update_time"` // Timestamp of last change to the VPC peering connection + UserPeerNetworkCidrs []string `json:"user_peer_network_cidrs"` // List of private IPv4 ranges to route through the peering connection + VpcPeeringConnectionType VpcPeeringConnectionType `json:"vpc_peering_connection_type"` // Type of network connection from the VPC } + +// StateInfoOut State-specific help or error information type StateInfoOut struct { - Message string `json:"message"` - Type string `json:"type"` - Warnings []WarningOut `json:"warnings,omitempty"` + Message string `json:"message"` // Human-readable information message + Type string `json:"type"` // Type of state information + Warnings []WarningOut `json:"warnings,omitempty"` // List of warnings if any } + +// VpcCreateIn VpcCreateRequestBody type VpcCreateIn struct { - CloudName string `json:"cloud_name"` - NetworkCidr string `json:"network_cidr"` - PeeringConnections []PeeringConnectionIn `json:"peering_connections"` + CloudName string `json:"cloud_name"` // Target cloud + NetworkCidr string `json:"network_cidr"` // IPv4 network range CIDR + PeeringConnections []PeeringConnectionIn `json:"peering_connections"` // List of peering connection requests for the VPC } + +// VpcCreateOut VpcCreateResponse type VpcCreateOut struct { - CloudName string `json:"cloud_name"` - CreateTime time.Time `json:"create_time"` - NetworkCidr string `json:"network_cidr"` - PeeringConnections []PeeringConnectionOut `json:"peering_connections"` - PendingBuildOnlyPeeringConnections *string `json:"pending_build_only_peering_connections,omitempty"` - ProjectVpcId string `json:"project_vpc_id"` - State VpcStateType `json:"state"` - UpdateTime time.Time `json:"update_time"` + CloudName string `json:"cloud_name"` // Target cloud + CreateTime time.Time `json:"create_time"` // VPC creation timestamp + NetworkCidr string `json:"network_cidr"` // IPv4 network range CIDR + PeeringConnections []PeeringConnectionOut `json:"peering_connections"` // List of peering connections + PendingBuildOnlyPeeringConnections *string `json:"pending_build_only_peering_connections,omitempty"` // VPC rebuild is scheduled + ProjectVpcId string `json:"project_vpc_id"` // Project VPC ID + State VpcStateType `json:"state"` // Project VPC state + UpdateTime time.Time `json:"update_time"` // Timestamp of last change to VPC } + +// VpcDeleteOut VpcDeleteResponse type VpcDeleteOut struct { - CloudName string `json:"cloud_name"` - CreateTime time.Time `json:"create_time"` - NetworkCidr string `json:"network_cidr"` - PeeringConnections []PeeringConnectionOut `json:"peering_connections"` - PendingBuildOnlyPeeringConnections *string `json:"pending_build_only_peering_connections,omitempty"` - ProjectVpcId string `json:"project_vpc_id"` - State VpcStateType `json:"state"` - UpdateTime time.Time `json:"update_time"` + CloudName string `json:"cloud_name"` // Target cloud + CreateTime time.Time `json:"create_time"` // VPC creation timestamp + NetworkCidr string `json:"network_cidr"` // IPv4 network range CIDR + PeeringConnections []PeeringConnectionOut `json:"peering_connections"` // List of peering connections + PendingBuildOnlyPeeringConnections *string `json:"pending_build_only_peering_connections,omitempty"` // VPC rebuild is scheduled + ProjectVpcId string `json:"project_vpc_id"` // Project VPC ID + State VpcStateType `json:"state"` // Project VPC state + UpdateTime time.Time `json:"update_time"` // Timestamp of last change to VPC } + +// VpcGetOut VpcGetResponse type VpcGetOut struct { - CloudName string `json:"cloud_name"` - CreateTime time.Time `json:"create_time"` - NetworkCidr string `json:"network_cidr"` - PeeringConnections []PeeringConnectionOut `json:"peering_connections"` - PendingBuildOnlyPeeringConnections *string `json:"pending_build_only_peering_connections,omitempty"` - ProjectVpcId string `json:"project_vpc_id"` - State VpcStateType `json:"state"` - UpdateTime time.Time `json:"update_time"` + CloudName string `json:"cloud_name"` // Target cloud + CreateTime time.Time `json:"create_time"` // VPC creation timestamp + NetworkCidr string `json:"network_cidr"` // IPv4 network range CIDR + PeeringConnections []PeeringConnectionOut `json:"peering_connections"` // List of peering connections + PendingBuildOnlyPeeringConnections *string `json:"pending_build_only_peering_connections,omitempty"` // VPC rebuild is scheduled + ProjectVpcId string `json:"project_vpc_id"` // Project VPC ID + State VpcStateType `json:"state"` // Project VPC state + UpdateTime time.Time `json:"update_time"` // Timestamp of last change to VPC } type VpcOut struct { - CloudName string `json:"cloud_name"` - CreateTime time.Time `json:"create_time"` - NetworkCidr string `json:"network_cidr"` - ProjectVpcId string `json:"project_vpc_id"` - State VpcStateType `json:"state"` - UpdateTime time.Time `json:"update_time"` + CloudName string `json:"cloud_name"` // Target cloud + CreateTime time.Time `json:"create_time"` // VPC creation timestamp + NetworkCidr string `json:"network_cidr"` // IPv4 network range CIDR + ProjectVpcId string `json:"project_vpc_id"` // Project VPC ID + State VpcStateType `json:"state"` // Project VPC state + UpdateTime time.Time `json:"update_time"` // Timestamp of last change to VPC } + +// VpcPeeringConnectionCreateIn VpcPeeringConnectionCreateRequestBody type VpcPeeringConnectionCreateIn struct { - PeerAzureAppId *string `json:"peer_azure_app_id,omitempty"` - PeerAzureTenantId *string `json:"peer_azure_tenant_id,omitempty"` - PeerCloudAccount string `json:"peer_cloud_account"` - PeerRegion *string `json:"peer_region,omitempty"` - PeerResourceGroup *string `json:"peer_resource_group,omitempty"` - PeerVpc string `json:"peer_vpc"` - UserPeerNetworkCidrs *[]string `json:"user_peer_network_cidrs,omitempty"` + PeerAzureAppId *string `json:"peer_azure_app_id,omitempty"` // Azure app registration id in UUID4 form that is allowed to create a peering to the peer vnet + PeerAzureTenantId *string `json:"peer_azure_tenant_id,omitempty"` // Azure tenant id in UUID4 form + PeerCloudAccount string `json:"peer_cloud_account"` // AWS account ID, GCP project ID, Azure subscription ID of the peered VPC, or string "upcloud" for UpCloud peering connections + PeerRegion *string `json:"peer_region,omitempty"` // The peer VPC's region on AWS. May be omitted or set to null if the peer is in the same region as the Aiven project VPC. Omit or set to null on GCP, Azure, or UpCloud. + PeerResourceGroup *string `json:"peer_resource_group,omitempty"` // Azure resource group name of the peered VPC + PeerVpc string `json:"peer_vpc"` // AWS VPC ID, GCP VPC network name, Azure Virtual network name of the peered VPC, or UpCloud VPC ID + UserPeerNetworkCidrs *[]string `json:"user_peer_network_cidrs,omitempty"` // List of private IPv4 ranges to route through the peering connection } + +// VpcPeeringConnectionCreateOut VpcPeeringConnectionCreateResponse type VpcPeeringConnectionCreateOut struct { - CreateTime time.Time `json:"create_time"` - PeerAzureAppId string `json:"peer_azure_app_id"` - PeerAzureTenantId string `json:"peer_azure_tenant_id"` - PeerCloudAccount string `json:"peer_cloud_account"` - PeerRegion *string `json:"peer_region,omitempty"` - PeerResourceGroup string `json:"peer_resource_group"` - PeerVpc string `json:"peer_vpc"` - State VpcPeeringConnectionStateType `json:"state"` - StateInfo StateInfoOut `json:"state_info"` - UpdateTime time.Time `json:"update_time"` - UserPeerNetworkCidrs []string `json:"user_peer_network_cidrs"` - VpcPeeringConnectionType VpcPeeringConnectionType `json:"vpc_peering_connection_type"` + CreateTime time.Time `json:"create_time"` // VPC peering connection creation timestamp + PeerAzureAppId string `json:"peer_azure_app_id"` // Azure app registration id in UUID4 form that is allowed to create a peering to the peer vnet + PeerAzureTenantId string `json:"peer_azure_tenant_id"` // Azure tenant id in UUID4 form + PeerCloudAccount string `json:"peer_cloud_account"` // AWS account ID, GCP project ID, Azure subscription ID of the peered VPC, or string "upcloud" for UpCloud peering connections + PeerRegion *string `json:"peer_region,omitempty"` // The peer VPC's region in AWS clouds. Always null in GCP, Azure, or UpCloud clouds + PeerResourceGroup string `json:"peer_resource_group"` // Azure resource group name of the peered VPC + PeerVpc string `json:"peer_vpc"` // AWS VPC ID, GCP VPC network name, Azure Virtual network name of the peered VPC, or UpCloud VPC ID + State VpcPeeringConnectionStateType `json:"state"` // Project VPC peering connection state + StateInfo StateInfoOut `json:"state_info"` // State-specific help or error information + UpdateTime time.Time `json:"update_time"` // Timestamp of last change to the VPC peering connection + UserPeerNetworkCidrs []string `json:"user_peer_network_cidrs"` // List of private IPv4 ranges to route through the peering connection + VpcPeeringConnectionType VpcPeeringConnectionType `json:"vpc_peering_connection_type"` // Type of network connection from the VPC } + +// VpcPeeringConnectionDeleteOut VpcPeeringConnectionDeleteResponse type VpcPeeringConnectionDeleteOut struct { - CreateTime time.Time `json:"create_time"` - PeerAzureAppId string `json:"peer_azure_app_id"` - PeerAzureTenantId string `json:"peer_azure_tenant_id"` - PeerCloudAccount string `json:"peer_cloud_account"` - PeerRegion *string `json:"peer_region,omitempty"` - PeerResourceGroup string `json:"peer_resource_group"` - PeerVpc string `json:"peer_vpc"` - State VpcPeeringConnectionStateType `json:"state"` - StateInfo StateInfoOut `json:"state_info"` - UpdateTime time.Time `json:"update_time"` - UserPeerNetworkCidrs []string `json:"user_peer_network_cidrs"` - VpcPeeringConnectionType VpcPeeringConnectionType `json:"vpc_peering_connection_type"` + CreateTime time.Time `json:"create_time"` // VPC peering connection creation timestamp + PeerAzureAppId string `json:"peer_azure_app_id"` // Azure app registration id in UUID4 form that is allowed to create a peering to the peer vnet + PeerAzureTenantId string `json:"peer_azure_tenant_id"` // Azure tenant id in UUID4 form + PeerCloudAccount string `json:"peer_cloud_account"` // AWS account ID, GCP project ID, Azure subscription ID of the peered VPC, or string "upcloud" for UpCloud peering connections + PeerRegion *string `json:"peer_region,omitempty"` // The peer VPC's region in AWS clouds. Always null in GCP, Azure, or UpCloud clouds + PeerResourceGroup string `json:"peer_resource_group"` // Azure resource group name of the peered VPC + PeerVpc string `json:"peer_vpc"` // AWS VPC ID, GCP VPC network name, Azure Virtual network name of the peered VPC, or UpCloud VPC ID + State VpcPeeringConnectionStateType `json:"state"` // Project VPC peering connection state + StateInfo StateInfoOut `json:"state_info"` // State-specific help or error information + UpdateTime time.Time `json:"update_time"` // Timestamp of last change to the VPC peering connection + UserPeerNetworkCidrs []string `json:"user_peer_network_cidrs"` // List of private IPv4 ranges to route through the peering connection + VpcPeeringConnectionType VpcPeeringConnectionType `json:"vpc_peering_connection_type"` // Type of network connection from the VPC } type VpcPeeringConnectionStateType string @@ -347,47 +363,54 @@ func VpcPeeringConnectionTypeChoices() []string { return []string{"aws-tgw-vpc-attachment", "aws-vpc-peering-connection", "azure-vnet-peering", "google-vpc-peering", "upcloud-vpc-peering"} } +// VpcPeeringConnectionUpdateIn VpcPeeringConnectionUpdateRequestBody type VpcPeeringConnectionUpdateIn struct { - Add *[]AddIn `json:"add,omitempty"` - Delete *[]string `json:"delete,omitempty"` + Add *[]AddIn `json:"add,omitempty"` // CIDRs to add using a specific peering connection + Delete *[]string `json:"delete,omitempty"` // Network CIDRs to remove from the VPC's peering connections' user_peer_network_cidrs } + +// VpcPeeringConnectionUpdateOut VpcPeeringConnectionUpdateResponse type VpcPeeringConnectionUpdateOut struct { - CloudName string `json:"cloud_name"` - CreateTime time.Time `json:"create_time"` - NetworkCidr string `json:"network_cidr"` - PeeringConnections []PeeringConnectionOut `json:"peering_connections"` - PendingBuildOnlyPeeringConnections *string `json:"pending_build_only_peering_connections,omitempty"` - ProjectVpcId string `json:"project_vpc_id"` - State VpcPeeringConnectionStateTypeAlt `json:"state"` - UpdateTime time.Time `json:"update_time"` + CloudName string `json:"cloud_name"` // Target cloud + CreateTime time.Time `json:"create_time"` // VPC creation timestamp + NetworkCidr string `json:"network_cidr"` // IPv4 network range CIDR + PeeringConnections []PeeringConnectionOut `json:"peering_connections"` // List of peering connections + PendingBuildOnlyPeeringConnections *string `json:"pending_build_only_peering_connections,omitempty"` // VPC rebuild is scheduled + ProjectVpcId string `json:"project_vpc_id"` // Project VPC ID + State VpcPeeringConnectionStateTypeAlt `json:"state"` // Project VPC state + UpdateTime time.Time `json:"update_time"` // Timestamp of last change to VPC } + +// VpcPeeringConnectionWithRegionDeleteOut VpcPeeringConnectionWithRegionDeleteResponse type VpcPeeringConnectionWithRegionDeleteOut struct { - CreateTime time.Time `json:"create_time"` - PeerAzureAppId string `json:"peer_azure_app_id"` - PeerAzureTenantId string `json:"peer_azure_tenant_id"` - PeerCloudAccount string `json:"peer_cloud_account"` - PeerRegion *string `json:"peer_region,omitempty"` - PeerResourceGroup string `json:"peer_resource_group"` - PeerVpc string `json:"peer_vpc"` - State VpcPeeringConnectionStateType `json:"state"` - StateInfo StateInfoOut `json:"state_info"` - UpdateTime time.Time `json:"update_time"` - UserPeerNetworkCidrs []string `json:"user_peer_network_cidrs"` - VpcPeeringConnectionType VpcPeeringConnectionType `json:"vpc_peering_connection_type"` + CreateTime time.Time `json:"create_time"` // VPC peering connection creation timestamp + PeerAzureAppId string `json:"peer_azure_app_id"` // Azure app registration id in UUID4 form that is allowed to create a peering to the peer vnet + PeerAzureTenantId string `json:"peer_azure_tenant_id"` // Azure tenant id in UUID4 form + PeerCloudAccount string `json:"peer_cloud_account"` // AWS account ID, GCP project ID, Azure subscription ID of the peered VPC, or string "upcloud" for UpCloud peering connections + PeerRegion *string `json:"peer_region,omitempty"` // The peer VPC's region in AWS clouds. Always null in GCP, Azure, or UpCloud clouds + PeerResourceGroup string `json:"peer_resource_group"` // Azure resource group name of the peered VPC + PeerVpc string `json:"peer_vpc"` // AWS VPC ID, GCP VPC network name, Azure Virtual network name of the peered VPC, or UpCloud VPC ID + State VpcPeeringConnectionStateType `json:"state"` // Project VPC peering connection state + StateInfo StateInfoOut `json:"state_info"` // State-specific help or error information + UpdateTime time.Time `json:"update_time"` // Timestamp of last change to the VPC peering connection + UserPeerNetworkCidrs []string `json:"user_peer_network_cidrs"` // List of private IPv4 ranges to route through the peering connection + VpcPeeringConnectionType VpcPeeringConnectionType `json:"vpc_peering_connection_type"` // Type of network connection from the VPC } + +// VpcPeeringConnectionWithResourceGroupDeleteOut VpcPeeringConnectionWithResourceGroupDeleteResponse type VpcPeeringConnectionWithResourceGroupDeleteOut struct { - CreateTime time.Time `json:"create_time"` - PeerAzureAppId string `json:"peer_azure_app_id"` - PeerAzureTenantId string `json:"peer_azure_tenant_id"` - PeerCloudAccount string `json:"peer_cloud_account"` - PeerRegion *string `json:"peer_region,omitempty"` - PeerResourceGroup string `json:"peer_resource_group"` - PeerVpc string `json:"peer_vpc"` - State VpcPeeringConnectionStateType `json:"state"` - StateInfo StateInfoOut `json:"state_info"` - UpdateTime time.Time `json:"update_time"` - UserPeerNetworkCidrs []string `json:"user_peer_network_cidrs"` - VpcPeeringConnectionType VpcPeeringConnectionType `json:"vpc_peering_connection_type"` + CreateTime time.Time `json:"create_time"` // VPC peering connection creation timestamp + PeerAzureAppId string `json:"peer_azure_app_id"` // Azure app registration id in UUID4 form that is allowed to create a peering to the peer vnet + PeerAzureTenantId string `json:"peer_azure_tenant_id"` // Azure tenant id in UUID4 form + PeerCloudAccount string `json:"peer_cloud_account"` // AWS account ID, GCP project ID, Azure subscription ID of the peered VPC, or string "upcloud" for UpCloud peering connections + PeerRegion *string `json:"peer_region,omitempty"` // The peer VPC's region in AWS clouds. Always null in GCP, Azure, or UpCloud clouds + PeerResourceGroup string `json:"peer_resource_group"` // Azure resource group name of the peered VPC + PeerVpc string `json:"peer_vpc"` // AWS VPC ID, GCP VPC network name, Azure Virtual network name of the peered VPC, or UpCloud VPC ID + State VpcPeeringConnectionStateType `json:"state"` // Project VPC peering connection state + StateInfo StateInfoOut `json:"state_info"` // State-specific help or error information + UpdateTime time.Time `json:"update_time"` // Timestamp of last change to the VPC peering connection + UserPeerNetworkCidrs []string `json:"user_peer_network_cidrs"` // List of private IPv4 ranges to route through the peering connection + VpcPeeringConnectionType VpcPeeringConnectionType `json:"vpc_peering_connection_type"` // Type of network connection from the VPC } type VpcStateType string @@ -403,11 +426,11 @@ func VpcStateTypeChoices() []string { } type WarningOut struct { - ConflictingAwsAccountId *string `json:"conflicting_aws_account_id,omitempty"` - ConflictingAwsVpcId *string `json:"conflicting_aws_vpc_id,omitempty"` - ConflictingAwsVpcPeeringConnectionId *string `json:"conflicting_aws_vpc_peering_connection_id,omitempty"` - Message string `json:"message"` - Type WarningType `json:"type"` + ConflictingAwsAccountId *string `json:"conflicting_aws_account_id,omitempty"` // AWS account id of conflicting VPC + ConflictingAwsVpcId *string `json:"conflicting_aws_vpc_id,omitempty"` // VPC id which is conflicting with the current one + ConflictingAwsVpcPeeringConnectionId *string `json:"conflicting_aws_vpc_peering_connection_id,omitempty"` // AWS VPC connection id which is conflicting with current VPC + Message string `json:"message"` // Warning message to be shown to the user + Type WarningType `json:"type"` // Type of warning } type WarningType string @@ -420,6 +443,7 @@ func WarningTypeChoices() []string { return []string{"overlapping-peer-vpc-ip-ranges", "upcloud-peering-in-error"} } +// vpcListOut VpcListResponse type vpcListOut struct { - Vpcs []VpcOut `json:"vpcs"` + Vpcs []VpcOut `json:"vpcs"` // List of VPCs }