// Code generated by ogen, DO NOT EDIT.
package gen
import (
"github.com/go-faster/errors"
"github.com/go-faster/jx"
)
// Ref: #/components/schemas/AdvisorsResponse
type AdvisorsResponse struct {
Lints []Lint `json:"lints"`
}
// GetLints returns the value of Lints.
func (s *AdvisorsResponse) GetLints() []Lint {
return s.Lints
}
// SetLints sets the value of Lints.
func (s *AdvisorsResponse) SetLints(val []Lint) {
s.Lints = val
}
// Ref: #/components/schemas/AnalyticsResponse
type AnalyticsResponse struct {
Result OptNilAnyArray `json:"result"`
Error OptNilString `json:"error"`
}
// GetResult returns the value of Result.
func (s *AnalyticsResponse) GetResult() OptNilAnyArray {
return s.Result
}
// GetError returns the value of Error.
func (s *AnalyticsResponse) GetError() OptNilString {
return s.Error
}
// SetResult sets the value of Result.
func (s *AnalyticsResponse) SetResult(val OptNilAnyArray) {
s.Result = val
}
// SetError sets the value of Error.
func (s *AnalyticsResponse) SetError(val OptNilString) {
s.Error = val
}
// Ref: #/components/schemas/ApiKey
type ApiKey struct {
APIKey OptNilString `json:"api_key"`
Name string `json:"name"`
Type OptNilString `json:"type"`
}
// GetAPIKey returns the value of APIKey.
func (s *ApiKey) GetAPIKey() OptNilString {
return s.APIKey
}
// GetName returns the value of Name.
func (s *ApiKey) GetName() string {
return s.Name
}
// GetType returns the value of Type.
func (s *ApiKey) GetType() OptNilString {
return s.Type
}
// SetAPIKey sets the value of APIKey.
func (s *ApiKey) SetAPIKey(val OptNilString) {
s.APIKey = val
}
// SetName sets the value of Name.
func (s *ApiKey) SetName(val string) {
s.Name = val
}
// SetType sets the value of Type.
func (s *ApiKey) SetType(val OptNilString) {
s.Type = val
}
type BearerAuth struct {
Token string
Roles []string
}
// GetToken returns the value of Token.
func (s *BearerAuth) GetToken() string {
return s.Token
}
// GetRoles returns the value of Roles.
func (s *BearerAuth) GetRoles() []string {
return s.Roles
}
// SetToken sets the value of Token.
func (s *BearerAuth) SetToken(val string) {
s.Token = val
}
// SetRoles sets the value of Roles.
func (s *BearerAuth) SetRoles(val []string) {
s.Roles = val
}
// Ref: #/components/schemas/EdgeFunction
type EdgeFunction struct {
ID string `json:"id"`
Slug string `json:"slug"`
Name string `json:"name"`
Status EdgeFunctionStatus `json:"status"`
Version int `json:"version"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
VerifyJwt OptBool `json:"verify_jwt"`
ImportMap OptBool `json:"import_map"`
EntrypointPath OptString `json:"entrypoint_path"`
ImportMapPath OptString `json:"import_map_path"`
}
// GetID returns the value of ID.
func (s *EdgeFunction) GetID() string {
return s.ID
}
// GetSlug returns the value of Slug.
func (s *EdgeFunction) GetSlug() string {
return s.Slug
}
// GetName returns the value of Name.
func (s *EdgeFunction) GetName() string {
return s.Name
}
// GetStatus returns the value of Status.
func (s *EdgeFunction) GetStatus() EdgeFunctionStatus {
return s.Status
}
// GetVersion returns the value of Version.
func (s *EdgeFunction) GetVersion() int {
return s.Version
}
// GetCreatedAt returns the value of CreatedAt.
func (s *EdgeFunction) GetCreatedAt() int64 {
return s.CreatedAt
}
// GetUpdatedAt returns the value of UpdatedAt.
func (s *EdgeFunction) GetUpdatedAt() int64 {
return s.UpdatedAt
}
// GetVerifyJwt returns the value of VerifyJwt.
func (s *EdgeFunction) GetVerifyJwt() OptBool {
return s.VerifyJwt
}
// GetImportMap returns the value of ImportMap.
func (s *EdgeFunction) GetImportMap() OptBool {
return s.ImportMap
}
// GetEntrypointPath returns the value of EntrypointPath.
func (s *EdgeFunction) GetEntrypointPath() OptString {
return s.EntrypointPath
}
// GetImportMapPath returns the value of ImportMapPath.
func (s *EdgeFunction) GetImportMapPath() OptString {
return s.ImportMapPath
}
// SetID sets the value of ID.
func (s *EdgeFunction) SetID(val string) {
s.ID = val
}
// SetSlug sets the value of Slug.
func (s *EdgeFunction) SetSlug(val string) {
s.Slug = val
}
// SetName sets the value of Name.
func (s *EdgeFunction) SetName(val string) {
s.Name = val
}
// SetStatus sets the value of Status.
func (s *EdgeFunction) SetStatus(val EdgeFunctionStatus) {
s.Status = val
}
// SetVersion sets the value of Version.
func (s *EdgeFunction) SetVersion(val int) {
s.Version = val
}
// SetCreatedAt sets the value of CreatedAt.
func (s *EdgeFunction) SetCreatedAt(val int64) {
s.CreatedAt = val
}
// SetUpdatedAt sets the value of UpdatedAt.
func (s *EdgeFunction) SetUpdatedAt(val int64) {
s.UpdatedAt = val
}
// SetVerifyJwt sets the value of VerifyJwt.
func (s *EdgeFunction) SetVerifyJwt(val OptBool) {
s.VerifyJwt = val
}
// SetImportMap sets the value of ImportMap.
func (s *EdgeFunction) SetImportMap(val OptBool) {
s.ImportMap = val
}
// SetEntrypointPath sets the value of EntrypointPath.
func (s *EdgeFunction) SetEntrypointPath(val OptString) {
s.EntrypointPath = val
}
// SetImportMapPath sets the value of ImportMapPath.
func (s *EdgeFunction) SetImportMapPath(val OptString) {
s.ImportMapPath = val
}
type EdgeFunctionStatus string
const (
EdgeFunctionStatusACTIVE EdgeFunctionStatus = "ACTIVE"
EdgeFunctionStatusREMOVED EdgeFunctionStatus = "REMOVED"
EdgeFunctionStatusTHROTTLED EdgeFunctionStatus = "THROTTLED"
)
// AllValues returns all EdgeFunctionStatus values.
func (EdgeFunctionStatus) AllValues() []EdgeFunctionStatus {
return []EdgeFunctionStatus{
EdgeFunctionStatusACTIVE,
EdgeFunctionStatusREMOVED,
EdgeFunctionStatusTHROTTLED,
}
}
// MarshalText implements encoding.TextMarshaler.
func (s EdgeFunctionStatus) MarshalText() ([]byte, error) {
switch s {
case EdgeFunctionStatusACTIVE:
return []byte(s), nil
case EdgeFunctionStatusREMOVED:
return []byte(s), nil
case EdgeFunctionStatusTHROTTLED:
return []byte(s), nil
default:
return nil, errors.Errorf("invalid value: %q", s)
}
}
// UnmarshalText implements encoding.TextUnmarshaler.
func (s *EdgeFunctionStatus) UnmarshalText(data []byte) error {
switch EdgeFunctionStatus(data) {
case EdgeFunctionStatusACTIVE:
*s = EdgeFunctionStatusACTIVE
return nil
case EdgeFunctionStatusREMOVED:
*s = EdgeFunctionStatusREMOVED
return nil
case EdgeFunctionStatusTHROTTLED:
*s = EdgeFunctionStatusTHROTTLED
return nil
default:
return errors.Errorf("invalid value: %q", data)
}
}
// Ref: #/components/schemas/FeatureToggle
type FeatureToggle struct {
Enabled bool `json:"enabled"`
}
// GetEnabled returns the value of Enabled.
func (s *FeatureToggle) GetEnabled() bool {
return s.Enabled
}
// SetEnabled sets the value of Enabled.
func (s *FeatureToggle) SetEnabled(val bool) {
s.Enabled = val
}
// Ref: #/components/schemas/Lint
type Lint struct {
Name string `json:"name"`
Title string `json:"title"`
Level LintLevel `json:"level"`
Facing string `json:"facing"`
Categories []string `json:"categories"`
Description string `json:"description"`
Detail string `json:"detail"`
Remediation string `json:"remediation"`
Metadata OptLintMetadata `json:"metadata"`
CacheKey string `json:"cache_key"`
}
// GetName returns the value of Name.
func (s *Lint) GetName() string {
return s.Name
}
// GetTitle returns the value of Title.
func (s *Lint) GetTitle() string {
return s.Title
}
// GetLevel returns the value of Level.
func (s *Lint) GetLevel() LintLevel {
return s.Level
}
// GetFacing returns the value of Facing.
func (s *Lint) GetFacing() string {
return s.Facing
}
// GetCategories returns the value of Categories.
func (s *Lint) GetCategories() []string {
return s.Categories
}
// GetDescription returns the value of Description.
func (s *Lint) GetDescription() string {
return s.Description
}
// GetDetail returns the value of Detail.
func (s *Lint) GetDetail() string {
return s.Detail
}
// GetRemediation returns the value of Remediation.
func (s *Lint) GetRemediation() string {
return s.Remediation
}
// GetMetadata returns the value of Metadata.
func (s *Lint) GetMetadata() OptLintMetadata {
return s.Metadata
}
// GetCacheKey returns the value of CacheKey.
func (s *Lint) GetCacheKey() string {
return s.CacheKey
}
// SetName sets the value of Name.
func (s *Lint) SetName(val string) {
s.Name = val
}
// SetTitle sets the value of Title.
func (s *Lint) SetTitle(val string) {
s.Title = val
}
// SetLevel sets the value of Level.
func (s *Lint) SetLevel(val LintLevel) {
s.Level = val
}
// SetFacing sets the value of Facing.
func (s *Lint) SetFacing(val string) {
s.Facing = val
}
// SetCategories sets the value of Categories.
func (s *Lint) SetCategories(val []string) {
s.Categories = val
}
// SetDescription sets the value of Description.
func (s *Lint) SetDescription(val string) {
s.Description = val
}
// SetDetail sets the value of Detail.
func (s *Lint) SetDetail(val string) {
s.Detail = val
}
// SetRemediation sets the value of Remediation.
func (s *Lint) SetRemediation(val string) {
s.Remediation = val
}
// SetMetadata sets the value of Metadata.
func (s *Lint) SetMetadata(val OptLintMetadata) {
s.Metadata = val
}
// SetCacheKey sets the value of CacheKey.
func (s *Lint) SetCacheKey(val string) {
s.CacheKey = val
}
type LintLevel string
const (
LintLevelERROR LintLevel = "ERROR"
LintLevelWARN LintLevel = "WARN"
LintLevelINFO LintLevel = "INFO"
)
// AllValues returns all LintLevel values.
func (LintLevel) AllValues() []LintLevel {
return []LintLevel{
LintLevelERROR,
LintLevelWARN,
LintLevelINFO,
}
}
// MarshalText implements encoding.TextMarshaler.
func (s LintLevel) MarshalText() ([]byte, error) {
switch s {
case LintLevelERROR:
return []byte(s), nil
case LintLevelWARN:
return []byte(s), nil
case LintLevelINFO:
return []byte(s), nil
default:
return nil, errors.Errorf("invalid value: %q", s)
}
}
// UnmarshalText implements encoding.TextUnmarshaler.
func (s *LintLevel) UnmarshalText(data []byte) error {
switch LintLevel(data) {
case LintLevelERROR:
*s = LintLevelERROR
return nil
case LintLevelWARN:
*s = LintLevelWARN
return nil
case LintLevelINFO:
*s = LintLevelINFO
return nil
default:
return errors.Errorf("invalid value: %q", data)
}
}
// Ref: #/components/schemas/LintMetadata
type LintMetadata struct {
Schema OptString `json:"schema"`
Name OptString `json:"name"`
Entity OptString `json:"entity"`
Type OptString `json:"type"`
}
// GetSchema returns the value of Schema.
func (s *LintMetadata) GetSchema() OptString {
return s.Schema
}
// GetName returns the value of Name.
func (s *LintMetadata) GetName() OptString {
return s.Name
}
// GetEntity returns the value of Entity.
func (s *LintMetadata) GetEntity() OptString {
return s.Entity
}
// GetType returns the value of Type.
func (s *LintMetadata) GetType() OptString {
return s.Type
}
// SetSchema sets the value of Schema.
func (s *LintMetadata) SetSchema(val OptString) {
s.Schema = val
}
// SetName sets the value of Name.
func (s *LintMetadata) SetName(val OptString) {
s.Name = val
}
// SetEntity sets the value of Entity.
func (s *LintMetadata) SetEntity(val OptString) {
s.Entity = val
}
// SetType sets the value of Type.
func (s *LintMetadata) SetType(val OptString) {
s.Type = val
}
// NewOptBool returns new OptBool with value set to v.
func NewOptBool(v bool) OptBool {
return OptBool{
Value: v,
Set: true,
}
}
// OptBool is optional bool.
type OptBool struct {
Value bool
Set bool
}
// IsSet returns true if OptBool was set.
func (o OptBool) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptBool) Reset() {
var v bool
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptBool) SetTo(v bool) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptBool) Get() (v bool, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptBool) Or(d bool) bool {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptFeatureToggle returns new OptFeatureToggle with value set to v.
func NewOptFeatureToggle(v FeatureToggle) OptFeatureToggle {
return OptFeatureToggle{
Value: v,
Set: true,
}
}
// OptFeatureToggle is optional FeatureToggle.
type OptFeatureToggle struct {
Value FeatureToggle
Set bool
}
// IsSet returns true if OptFeatureToggle was set.
func (o OptFeatureToggle) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptFeatureToggle) Reset() {
var v FeatureToggle
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptFeatureToggle) SetTo(v FeatureToggle) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptFeatureToggle) Get() (v FeatureToggle, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptFeatureToggle) Or(d FeatureToggle) FeatureToggle {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptLintMetadata returns new OptLintMetadata with value set to v.
func NewOptLintMetadata(v LintMetadata) OptLintMetadata {
return OptLintMetadata{
Value: v,
Set: true,
}
}
// OptLintMetadata is optional LintMetadata.
type OptLintMetadata struct {
Value LintMetadata
Set bool
}
// IsSet returns true if OptLintMetadata was set.
func (o OptLintMetadata) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptLintMetadata) Reset() {
var v LintMetadata
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptLintMetadata) SetTo(v LintMetadata) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptLintMetadata) Get() (v LintMetadata, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptLintMetadata) Or(d LintMetadata) LintMetadata {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptNilAnyArray returns new OptNilAnyArray with value set to v.
func NewOptNilAnyArray(v []jx.Raw) OptNilAnyArray {
return OptNilAnyArray{
Value: v,
Set: true,
}
}
// OptNilAnyArray is optional nullable []jx.Raw.
type OptNilAnyArray struct {
Value []jx.Raw
Set bool
Null bool
}
// IsSet returns true if OptNilAnyArray was set.
func (o OptNilAnyArray) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptNilAnyArray) Reset() {
var v []jx.Raw
o.Value = v
o.Set = false
o.Null = false
}
// SetTo sets value to v.
func (o *OptNilAnyArray) SetTo(v []jx.Raw) {
o.Set = true
o.Null = false
o.Value = v
}
// IsNull returns true if value is Null.
func (o OptNilAnyArray) IsNull() bool { return o.Null }
// SetToNull sets value to null.
func (o *OptNilAnyArray) SetToNull() {
o.Set = true
o.Null = true
var v []jx.Raw
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptNilAnyArray) Get() (v []jx.Raw, ok bool) {
if o.Null {
return v, false
}
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptNilAnyArray) Or(d []jx.Raw) []jx.Raw {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptNilString returns new OptNilString with value set to v.
func NewOptNilString(v string) OptNilString {
return OptNilString{
Value: v,
Set: true,
}
}
// OptNilString is optional nullable string.
type OptNilString struct {
Value string
Set bool
Null bool
}
// IsSet returns true if OptNilString was set.
func (o OptNilString) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptNilString) Reset() {
var v string
o.Value = v
o.Set = false
o.Null = false
}
// SetTo sets value to v.
func (o *OptNilString) SetTo(v string) {
o.Set = true
o.Null = false
o.Value = v
}
// IsNull returns true if value is Null.
func (o OptNilString) IsNull() bool { return o.Null }
// SetToNull sets value to null.
func (o *OptNilString) SetToNull() {
o.Set = true
o.Null = true
var v string
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptNilString) Get() (v string, ok bool) {
if o.Null {
return v, false
}
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptNilString) Or(d string) string {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptStorageFeatures returns new OptStorageFeatures with value set to v.
func NewOptStorageFeatures(v StorageFeatures) OptStorageFeatures {
return OptStorageFeatures{
Value: v,
Set: true,
}
}
// OptStorageFeatures is optional StorageFeatures.
type OptStorageFeatures struct {
Value StorageFeatures
Set bool
}
// IsSet returns true if OptStorageFeatures was set.
func (o OptStorageFeatures) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptStorageFeatures) Reset() {
var v StorageFeatures
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptStorageFeatures) SetTo(v StorageFeatures) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptStorageFeatures) Get() (v StorageFeatures, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptStorageFeatures) Or(d StorageFeatures) StorageFeatures {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptString returns new OptString with value set to v.
func NewOptString(v string) OptString {
return OptString{
Value: v,
Set: true,
}
}
// OptString is optional string.
type OptString struct {
Value string
Set bool
}
// IsSet returns true if OptString was set.
func (o OptString) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptString) Reset() {
var v string
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptString) SetTo(v string) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptString) Get() (v string, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptString) Or(d string) string {
if v, ok := o.Get(); ok {
return v
}
return d
}
// Ref: #/components/schemas/Organization
type Organization struct {
ID string `json:"id"`
Slug string `json:"slug"`
Name string `json:"name"`
}
// GetID returns the value of ID.
func (s *Organization) GetID() string {
return s.ID
}
// GetSlug returns the value of Slug.
func (s *Organization) GetSlug() string {
return s.Slug
}
// GetName returns the value of Name.
func (s *Organization) GetName() string {
return s.Name
}
// SetID sets the value of ID.
func (s *Organization) SetID(val string) {
s.ID = val
}
// SetSlug sets the value of Slug.
func (s *Organization) SetSlug(val string) {
s.Slug = val
}
// SetName sets the value of Name.
func (s *Organization) SetName(val string) {
s.Name = val
}
// Ref: #/components/schemas/Project
type Project struct {
ID string `json:"id"`
Ref string `json:"ref"`
OrganizationID string `json:"organization_id"`
OrganizationSlug string `json:"organization_slug"`
Name string `json:"name"`
Region string `json:"region"`
CreatedAt string `json:"created_at"`
Status ProjectStatus `json:"status"`
Database ProjectDatabase `json:"database"`
}
// GetID returns the value of ID.
func (s *Project) GetID() string {
return s.ID
}
// GetRef returns the value of Ref.
func (s *Project) GetRef() string {
return s.Ref
}
// GetOrganizationID returns the value of OrganizationID.
func (s *Project) GetOrganizationID() string {
return s.OrganizationID
}
// GetOrganizationSlug returns the value of OrganizationSlug.
func (s *Project) GetOrganizationSlug() string {
return s.OrganizationSlug
}
// GetName returns the value of Name.
func (s *Project) GetName() string {
return s.Name
}
// GetRegion returns the value of Region.
func (s *Project) GetRegion() string {
return s.Region
}
// GetCreatedAt returns the value of CreatedAt.
func (s *Project) GetCreatedAt() string {
return s.CreatedAt
}
// GetStatus returns the value of Status.
func (s *Project) GetStatus() ProjectStatus {
return s.Status
}
// GetDatabase returns the value of Database.
func (s *Project) GetDatabase() ProjectDatabase {
return s.Database
}
// SetID sets the value of ID.
func (s *Project) SetID(val string) {
s.ID = val
}
// SetRef sets the value of Ref.
func (s *Project) SetRef(val string) {
s.Ref = val
}
// SetOrganizationID sets the value of OrganizationID.
func (s *Project) SetOrganizationID(val string) {
s.OrganizationID = val
}
// SetOrganizationSlug sets the value of OrganizationSlug.
func (s *Project) SetOrganizationSlug(val string) {
s.OrganizationSlug = val
}
// SetName sets the value of Name.
func (s *Project) SetName(val string) {
s.Name = val
}
// SetRegion sets the value of Region.
func (s *Project) SetRegion(val string) {
s.Region = val
}
// SetCreatedAt sets the value of CreatedAt.
func (s *Project) SetCreatedAt(val string) {
s.CreatedAt = val
}
// SetStatus sets the value of Status.
func (s *Project) SetStatus(val ProjectStatus) {
s.Status = val
}
// SetDatabase sets the value of Database.
func (s *Project) SetDatabase(val ProjectDatabase) {
s.Database = val
}
// Ref: #/components/schemas/ProjectDatabase
type ProjectDatabase struct {
Host string `json:"host"`
Version string `json:"version"`
PostgresEngine string `json:"postgres_engine"`
ReleaseChannel string `json:"release_channel"`
}
// GetHost returns the value of Host.
func (s *ProjectDatabase) GetHost() string {
return s.Host
}
// GetVersion returns the value of Version.
func (s *ProjectDatabase) GetVersion() string {
return s.Version
}
// GetPostgresEngine returns the value of PostgresEngine.
func (s *ProjectDatabase) GetPostgresEngine() string {
return s.PostgresEngine
}
// GetReleaseChannel returns the value of ReleaseChannel.
func (s *ProjectDatabase) GetReleaseChannel() string {
return s.ReleaseChannel
}
// SetHost sets the value of Host.
func (s *ProjectDatabase) SetHost(val string) {
s.Host = val
}
// SetVersion sets the value of Version.
func (s *ProjectDatabase) SetVersion(val string) {
s.Version = val
}
// SetPostgresEngine sets the value of PostgresEngine.
func (s *ProjectDatabase) SetPostgresEngine(val string) {
s.PostgresEngine = val
}
// SetReleaseChannel sets the value of ReleaseChannel.
func (s *ProjectDatabase) SetReleaseChannel(val string) {
s.ReleaseChannel = val
}
type ProjectStatus string
const (
ProjectStatusINACTIVE ProjectStatus = "INACTIVE"
ProjectStatusACTIVEHEALTHY ProjectStatus = "ACTIVE_HEALTHY"
ProjectStatusACTIVEUNHEALTHY ProjectStatus = "ACTIVE_UNHEALTHY"
ProjectStatusCOMINGUP ProjectStatus = "COMING_UP"
ProjectStatusUNKNOWN ProjectStatus = "UNKNOWN"
ProjectStatusGOINGDOWN ProjectStatus = "GOING_DOWN"
ProjectStatusINITFAILED ProjectStatus = "INIT_FAILED"
ProjectStatusREMOVED ProjectStatus = "REMOVED"
ProjectStatusRESTORING ProjectStatus = "RESTORING"
ProjectStatusUPGRADING ProjectStatus = "UPGRADING"
ProjectStatusPAUSING ProjectStatus = "PAUSING"
ProjectStatusRESTOREFAILED ProjectStatus = "RESTORE_FAILED"
ProjectStatusRESTARTING ProjectStatus = "RESTARTING"
ProjectStatusPAUSEFAILED ProjectStatus = "PAUSE_FAILED"
ProjectStatusRESIZING ProjectStatus = "RESIZING"
)
// AllValues returns all ProjectStatus values.
func (ProjectStatus) AllValues() []ProjectStatus {
return []ProjectStatus{
ProjectStatusINACTIVE,
ProjectStatusACTIVEHEALTHY,
ProjectStatusACTIVEUNHEALTHY,
ProjectStatusCOMINGUP,
ProjectStatusUNKNOWN,
ProjectStatusGOINGDOWN,
ProjectStatusINITFAILED,
ProjectStatusREMOVED,
ProjectStatusRESTORING,
ProjectStatusUPGRADING,
ProjectStatusPAUSING,
ProjectStatusRESTOREFAILED,
ProjectStatusRESTARTING,
ProjectStatusPAUSEFAILED,
ProjectStatusRESIZING,
}
}
// MarshalText implements encoding.TextMarshaler.
func (s ProjectStatus) MarshalText() ([]byte, error) {
switch s {
case ProjectStatusINACTIVE:
return []byte(s), nil
case ProjectStatusACTIVEHEALTHY:
return []byte(s), nil
case ProjectStatusACTIVEUNHEALTHY:
return []byte(s), nil
case ProjectStatusCOMINGUP:
return []byte(s), nil
case ProjectStatusUNKNOWN:
return []byte(s), nil
case ProjectStatusGOINGDOWN:
return []byte(s), nil
case ProjectStatusINITFAILED:
return []byte(s), nil
case ProjectStatusREMOVED:
return []byte(s), nil
case ProjectStatusRESTORING:
return []byte(s), nil
case ProjectStatusUPGRADING:
return []byte(s), nil
case ProjectStatusPAUSING:
return []byte(s), nil
case ProjectStatusRESTOREFAILED:
return []byte(s), nil
case ProjectStatusRESTARTING:
return []byte(s), nil
case ProjectStatusPAUSEFAILED:
return []byte(s), nil
case ProjectStatusRESIZING:
return []byte(s), nil
default:
return nil, errors.Errorf("invalid value: %q", s)
}
}
// UnmarshalText implements encoding.TextUnmarshaler.
func (s *ProjectStatus) UnmarshalText(data []byte) error {
switch ProjectStatus(data) {
case ProjectStatusINACTIVE:
*s = ProjectStatusINACTIVE
return nil
case ProjectStatusACTIVEHEALTHY:
*s = ProjectStatusACTIVEHEALTHY
return nil
case ProjectStatusACTIVEUNHEALTHY:
*s = ProjectStatusACTIVEUNHEALTHY
return nil
case ProjectStatusCOMINGUP:
*s = ProjectStatusCOMINGUP
return nil
case ProjectStatusUNKNOWN:
*s = ProjectStatusUNKNOWN
return nil
case ProjectStatusGOINGDOWN:
*s = ProjectStatusGOINGDOWN
return nil
case ProjectStatusINITFAILED:
*s = ProjectStatusINITFAILED
return nil
case ProjectStatusREMOVED:
*s = ProjectStatusREMOVED
return nil
case ProjectStatusRESTORING:
*s = ProjectStatusRESTORING
return nil
case ProjectStatusUPGRADING:
*s = ProjectStatusUPGRADING
return nil
case ProjectStatusPAUSING:
*s = ProjectStatusPAUSING
return nil
case ProjectStatusRESTOREFAILED:
*s = ProjectStatusRESTOREFAILED
return nil
case ProjectStatusRESTARTING:
*s = ProjectStatusRESTARTING
return nil
case ProjectStatusPAUSEFAILED:
*s = ProjectStatusPAUSEFAILED
return nil
case ProjectStatusRESIZING:
*s = ProjectStatusRESIZING
return nil
default:
return errors.Errorf("invalid value: %q", data)
}
}
// Ref: #/components/schemas/RunQueryRequest
type RunQueryRequest struct {
Query string `json:"query"`
}
// GetQuery returns the value of Query.
func (s *RunQueryRequest) GetQuery() string {
return s.Query
}
// SetQuery sets the value of Query.
func (s *RunQueryRequest) SetQuery(val string) {
s.Query = val
}
// Ref: #/components/schemas/StorageBucket
type StorageBucket struct {
ID string `json:"id"`
Name string `json:"name"`
Owner string `json:"owner"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Public bool `json:"public"`
}
// GetID returns the value of ID.
func (s *StorageBucket) GetID() string {
return s.ID
}
// GetName returns the value of Name.
func (s *StorageBucket) GetName() string {
return s.Name
}
// GetOwner returns the value of Owner.
func (s *StorageBucket) GetOwner() string {
return s.Owner
}
// GetCreatedAt returns the value of CreatedAt.
func (s *StorageBucket) GetCreatedAt() string {
return s.CreatedAt
}
// GetUpdatedAt returns the value of UpdatedAt.
func (s *StorageBucket) GetUpdatedAt() string {
return s.UpdatedAt
}
// GetPublic returns the value of Public.
func (s *StorageBucket) GetPublic() bool {
return s.Public
}
// SetID sets the value of ID.
func (s *StorageBucket) SetID(val string) {
s.ID = val
}
// SetName sets the value of Name.
func (s *StorageBucket) SetName(val string) {
s.Name = val
}
// SetOwner sets the value of Owner.
func (s *StorageBucket) SetOwner(val string) {
s.Owner = val
}
// SetCreatedAt sets the value of CreatedAt.
func (s *StorageBucket) SetCreatedAt(val string) {
s.CreatedAt = val
}
// SetUpdatedAt sets the value of UpdatedAt.
func (s *StorageBucket) SetUpdatedAt(val string) {
s.UpdatedAt = val
}
// SetPublic sets the value of Public.
func (s *StorageBucket) SetPublic(val bool) {
s.Public = val
}
// Ref: #/components/schemas/StorageConfig
type StorageConfig struct {
FileSizeLimit int64 `json:"fileSizeLimit"`
Features OptStorageFeatures `json:"features"`
MigrationVersion OptString `json:"migrationVersion"`
DatabasePoolMode OptString `json:"databasePoolMode"`
}
// GetFileSizeLimit returns the value of FileSizeLimit.
func (s *StorageConfig) GetFileSizeLimit() int64 {
return s.FileSizeLimit
}
// GetFeatures returns the value of Features.
func (s *StorageConfig) GetFeatures() OptStorageFeatures {
return s.Features
}
// GetMigrationVersion returns the value of MigrationVersion.
func (s *StorageConfig) GetMigrationVersion() OptString {
return s.MigrationVersion
}
// GetDatabasePoolMode returns the value of DatabasePoolMode.
func (s *StorageConfig) GetDatabasePoolMode() OptString {
return s.DatabasePoolMode
}
// SetFileSizeLimit sets the value of FileSizeLimit.
func (s *StorageConfig) SetFileSizeLimit(val int64) {
s.FileSizeLimit = val
}
// SetFeatures sets the value of Features.
func (s *StorageConfig) SetFeatures(val OptStorageFeatures) {
s.Features = val
}
// SetMigrationVersion sets the value of MigrationVersion.
func (s *StorageConfig) SetMigrationVersion(val OptString) {
s.MigrationVersion = val
}
// SetDatabasePoolMode sets the value of DatabasePoolMode.
func (s *StorageConfig) SetDatabasePoolMode(val OptString) {
s.DatabasePoolMode = val
}
// Ref: #/components/schemas/StorageFeatures
type StorageFeatures struct {
ImageTransformation OptFeatureToggle `json:"imageTransformation"`
S3Protocol OptFeatureToggle `json:"s3Protocol"`
}
// GetImageTransformation returns the value of ImageTransformation.
func (s *StorageFeatures) GetImageTransformation() OptFeatureToggle {
return s.ImageTransformation
}
// GetS3Protocol returns the value of S3Protocol.
func (s *StorageFeatures) GetS3Protocol() OptFeatureToggle {
return s.S3Protocol
}
// SetImageTransformation sets the value of ImageTransformation.
func (s *StorageFeatures) SetImageTransformation(val OptFeatureToggle) {
s.ImageTransformation = val
}
// SetS3Protocol sets the value of S3Protocol.
func (s *StorageFeatures) SetS3Protocol(val OptFeatureToggle) {
s.S3Protocol = val
}