417 lines
14 KiB
Go
417 lines
14 KiB
Go
/*
|
|
STACKIT Intake API
|
|
|
|
This API provides endpoints for managing Intakes.
|
|
|
|
API version: 1beta.3.5
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package intakebeta
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the IntakeCatalog type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &IntakeCatalog{}
|
|
|
|
/*
|
|
types and functions for auth
|
|
*/
|
|
|
|
// isModel
|
|
type IntakeCatalogGetAuthAttributeType = *CatalogAuth
|
|
type IntakeCatalogGetAuthArgType = CatalogAuth
|
|
type IntakeCatalogGetAuthRetType = CatalogAuth
|
|
|
|
func getIntakeCatalogGetAuthAttributeTypeOk(arg IntakeCatalogGetAuthAttributeType) (ret IntakeCatalogGetAuthRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setIntakeCatalogGetAuthAttributeType(arg *IntakeCatalogGetAuthAttributeType, val IntakeCatalogGetAuthRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for namespace
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type IntakeCatalogGetNamespaceAttributeType = *string
|
|
|
|
func getIntakeCatalogGetNamespaceAttributeTypeOk(arg IntakeCatalogGetNamespaceAttributeType) (ret IntakeCatalogGetNamespaceRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setIntakeCatalogGetNamespaceAttributeType(arg *IntakeCatalogGetNamespaceAttributeType, val IntakeCatalogGetNamespaceRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type IntakeCatalogGetNamespaceArgType = string
|
|
type IntakeCatalogGetNamespaceRetType = string
|
|
|
|
/*
|
|
types and functions for partitionBy
|
|
*/
|
|
|
|
// isArray
|
|
type IntakeCatalogGetPartitionByAttributeType = *[]string
|
|
type IntakeCatalogGetPartitionByArgType = *[]string
|
|
type IntakeCatalogGetPartitionByRetType = *[]string
|
|
|
|
func getIntakeCatalogGetPartitionByAttributeTypeOk(arg IntakeCatalogGetPartitionByAttributeType) (ret IntakeCatalogGetPartitionByRetType, ok bool) {
|
|
if arg == nil {
|
|
return nil, false
|
|
}
|
|
return arg, true
|
|
}
|
|
|
|
func setIntakeCatalogGetPartitionByAttributeType(arg *IntakeCatalogGetPartitionByAttributeType, val IntakeCatalogGetPartitionByRetType) {
|
|
*arg = val
|
|
}
|
|
|
|
/*
|
|
types and functions for partitioning
|
|
*/
|
|
|
|
// isEnumRef
|
|
type IntakeCatalogGetPartitioningAttributeType = *PartitioningType
|
|
type IntakeCatalogGetPartitioningArgType = PartitioningType
|
|
type IntakeCatalogGetPartitioningRetType = PartitioningType
|
|
|
|
func getIntakeCatalogGetPartitioningAttributeTypeOk(arg IntakeCatalogGetPartitioningAttributeType) (ret IntakeCatalogGetPartitioningRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setIntakeCatalogGetPartitioningAttributeType(arg *IntakeCatalogGetPartitioningAttributeType, val IntakeCatalogGetPartitioningRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for tableName
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type IntakeCatalogGetTableNameAttributeType = *string
|
|
|
|
func getIntakeCatalogGetTableNameAttributeTypeOk(arg IntakeCatalogGetTableNameAttributeType) (ret IntakeCatalogGetTableNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setIntakeCatalogGetTableNameAttributeType(arg *IntakeCatalogGetTableNameAttributeType, val IntakeCatalogGetTableNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type IntakeCatalogGetTableNameArgType = string
|
|
type IntakeCatalogGetTableNameRetType = string
|
|
|
|
/*
|
|
types and functions for uri
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type IntakeCatalogGetUriAttributeType = *string
|
|
|
|
func getIntakeCatalogGetUriAttributeTypeOk(arg IntakeCatalogGetUriAttributeType) (ret IntakeCatalogGetUriRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setIntakeCatalogGetUriAttributeType(arg *IntakeCatalogGetUriAttributeType, val IntakeCatalogGetUriRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type IntakeCatalogGetUriArgType = string
|
|
type IntakeCatalogGetUriRetType = string
|
|
|
|
/*
|
|
types and functions for warehouse
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type IntakeCatalogGetWarehouseAttributeType = *string
|
|
|
|
func getIntakeCatalogGetWarehouseAttributeTypeOk(arg IntakeCatalogGetWarehouseAttributeType) (ret IntakeCatalogGetWarehouseRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setIntakeCatalogGetWarehouseAttributeType(arg *IntakeCatalogGetWarehouseAttributeType, val IntakeCatalogGetWarehouseRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type IntakeCatalogGetWarehouseArgType = string
|
|
type IntakeCatalogGetWarehouseRetType = string
|
|
|
|
// IntakeCatalog The Iceberg catalog configuration
|
|
type IntakeCatalog struct {
|
|
Auth IntakeCatalogGetAuthAttributeType `json:"auth,omitempty"`
|
|
// The namespace to which data shall be written. It will be automatically created, if it does not exist.
|
|
Namespace IntakeCatalogGetNamespaceAttributeType `json:"namespace,omitempty"`
|
|
// List of Iceberg partitioning expressions to use when creating the target table. This setting can only be used when `partitioning` is set to `manual`. Partitioning configuration of an Intake can be changed after creation, but will only take effect once the table has been changed as well. In case of not updating the table to a new one, the old partitioning configuration will remain. See the [Apache Iceberg spec](https://iceberg.apache.org/spec/#partitioning) for more details.
|
|
PartitionBy IntakeCatalogGetPartitionByAttributeType `json:"partitionBy,omitempty"`
|
|
Partitioning IntakeCatalogGetPartitioningAttributeType `json:"partitioning,omitempty"`
|
|
// The table name is a short name chosen by the user to identify the table in Iceberg.
|
|
TableName IntakeCatalogGetTableNameAttributeType `json:"tableName,omitempty"`
|
|
// The URI to the Iceberg catalog endpoint
|
|
// REQUIRED
|
|
Uri IntakeCatalogGetUriAttributeType `json:"uri" required:"true"`
|
|
// The Iceberg warehouse to connect to, required when the catalog has no default warehouse configured.
|
|
// REQUIRED
|
|
Warehouse IntakeCatalogGetWarehouseAttributeType `json:"warehouse" required:"true"`
|
|
}
|
|
|
|
type _IntakeCatalog IntakeCatalog
|
|
|
|
// NewIntakeCatalog instantiates a new IntakeCatalog object
|
|
// This constructor will assign default values to properties that have it defined,
|
|
// and makes sure properties required by API are set, but the set of arguments
|
|
// will change when the set of required properties is changed
|
|
func NewIntakeCatalog(uri IntakeCatalogGetUriArgType, warehouse IntakeCatalogGetWarehouseArgType) *IntakeCatalog {
|
|
this := IntakeCatalog{}
|
|
setIntakeCatalogGetUriAttributeType(&this.Uri, uri)
|
|
setIntakeCatalogGetWarehouseAttributeType(&this.Warehouse, warehouse)
|
|
return &this
|
|
}
|
|
|
|
// NewIntakeCatalogWithDefaults instantiates a new IntakeCatalog object
|
|
// This constructor will only assign default values to properties that have it defined,
|
|
// but it doesn't guarantee that properties required by API are set
|
|
func NewIntakeCatalogWithDefaults() *IntakeCatalog {
|
|
this := IntakeCatalog{}
|
|
var namespace string = "intake"
|
|
this.Namespace = &namespace
|
|
var partitioning PartitioningType = PARTITIONINGTYPE_NONE
|
|
this.Partitioning = &partitioning
|
|
return &this
|
|
}
|
|
|
|
// GetAuth returns the Auth field value if set, zero value otherwise.
|
|
func (o *IntakeCatalog) GetAuth() (res IntakeCatalogGetAuthRetType) {
|
|
res, _ = o.GetAuthOk()
|
|
return
|
|
}
|
|
|
|
// GetAuthOk returns a tuple with the Auth field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IntakeCatalog) GetAuthOk() (ret IntakeCatalogGetAuthRetType, ok bool) {
|
|
return getIntakeCatalogGetAuthAttributeTypeOk(o.Auth)
|
|
}
|
|
|
|
// HasAuth returns a boolean if a field has been set.
|
|
func (o *IntakeCatalog) HasAuth() bool {
|
|
_, ok := o.GetAuthOk()
|
|
return ok
|
|
}
|
|
|
|
// SetAuth gets a reference to the given CatalogAuth and assigns it to the Auth field.
|
|
func (o *IntakeCatalog) SetAuth(v IntakeCatalogGetAuthRetType) {
|
|
setIntakeCatalogGetAuthAttributeType(&o.Auth, v)
|
|
}
|
|
|
|
// GetNamespace returns the Namespace field value if set, zero value otherwise.
|
|
func (o *IntakeCatalog) GetNamespace() (res IntakeCatalogGetNamespaceRetType) {
|
|
res, _ = o.GetNamespaceOk()
|
|
return
|
|
}
|
|
|
|
// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IntakeCatalog) GetNamespaceOk() (ret IntakeCatalogGetNamespaceRetType, ok bool) {
|
|
return getIntakeCatalogGetNamespaceAttributeTypeOk(o.Namespace)
|
|
}
|
|
|
|
// HasNamespace returns a boolean if a field has been set.
|
|
func (o *IntakeCatalog) HasNamespace() bool {
|
|
_, ok := o.GetNamespaceOk()
|
|
return ok
|
|
}
|
|
|
|
// SetNamespace gets a reference to the given string and assigns it to the Namespace field.
|
|
func (o *IntakeCatalog) SetNamespace(v IntakeCatalogGetNamespaceRetType) {
|
|
setIntakeCatalogGetNamespaceAttributeType(&o.Namespace, v)
|
|
}
|
|
|
|
// GetPartitionBy returns the PartitionBy field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *IntakeCatalog) GetPartitionBy() (res IntakeCatalogGetPartitionByRetType) {
|
|
res, _ = o.GetPartitionByOk()
|
|
return
|
|
}
|
|
|
|
// GetPartitionByOk returns a tuple with the PartitionBy field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *IntakeCatalog) GetPartitionByOk() (ret IntakeCatalogGetPartitionByRetType, ok bool) {
|
|
return getIntakeCatalogGetPartitionByAttributeTypeOk(o.PartitionBy)
|
|
}
|
|
|
|
// HasPartitionBy returns a boolean if a field has been set.
|
|
func (o *IntakeCatalog) HasPartitionBy() bool {
|
|
_, ok := o.GetPartitionByOk()
|
|
return ok
|
|
}
|
|
|
|
// SetPartitionBy gets a reference to the given []string and assigns it to the PartitionBy field.
|
|
func (o *IntakeCatalog) SetPartitionBy(v IntakeCatalogGetPartitionByRetType) {
|
|
setIntakeCatalogGetPartitionByAttributeType(&o.PartitionBy, v)
|
|
}
|
|
|
|
// GetPartitioning returns the Partitioning field value if set, zero value otherwise.
|
|
func (o *IntakeCatalog) GetPartitioning() (res IntakeCatalogGetPartitioningRetType) {
|
|
res, _ = o.GetPartitioningOk()
|
|
return
|
|
}
|
|
|
|
// GetPartitioningOk returns a tuple with the Partitioning field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IntakeCatalog) GetPartitioningOk() (ret IntakeCatalogGetPartitioningRetType, ok bool) {
|
|
return getIntakeCatalogGetPartitioningAttributeTypeOk(o.Partitioning)
|
|
}
|
|
|
|
// HasPartitioning returns a boolean if a field has been set.
|
|
func (o *IntakeCatalog) HasPartitioning() bool {
|
|
_, ok := o.GetPartitioningOk()
|
|
return ok
|
|
}
|
|
|
|
// SetPartitioning gets a reference to the given PartitioningType and assigns it to the Partitioning field.
|
|
func (o *IntakeCatalog) SetPartitioning(v IntakeCatalogGetPartitioningRetType) {
|
|
setIntakeCatalogGetPartitioningAttributeType(&o.Partitioning, v)
|
|
}
|
|
|
|
// GetTableName returns the TableName field value if set, zero value otherwise.
|
|
func (o *IntakeCatalog) GetTableName() (res IntakeCatalogGetTableNameRetType) {
|
|
res, _ = o.GetTableNameOk()
|
|
return
|
|
}
|
|
|
|
// GetTableNameOk returns a tuple with the TableName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IntakeCatalog) GetTableNameOk() (ret IntakeCatalogGetTableNameRetType, ok bool) {
|
|
return getIntakeCatalogGetTableNameAttributeTypeOk(o.TableName)
|
|
}
|
|
|
|
// HasTableName returns a boolean if a field has been set.
|
|
func (o *IntakeCatalog) HasTableName() bool {
|
|
_, ok := o.GetTableNameOk()
|
|
return ok
|
|
}
|
|
|
|
// SetTableName gets a reference to the given string and assigns it to the TableName field.
|
|
func (o *IntakeCatalog) SetTableName(v IntakeCatalogGetTableNameRetType) {
|
|
setIntakeCatalogGetTableNameAttributeType(&o.TableName, v)
|
|
}
|
|
|
|
// GetUri returns the Uri field value
|
|
func (o *IntakeCatalog) GetUri() (ret IntakeCatalogGetUriRetType) {
|
|
ret, _ = o.GetUriOk()
|
|
return ret
|
|
}
|
|
|
|
// GetUriOk returns a tuple with the Uri field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IntakeCatalog) GetUriOk() (ret IntakeCatalogGetUriRetType, ok bool) {
|
|
return getIntakeCatalogGetUriAttributeTypeOk(o.Uri)
|
|
}
|
|
|
|
// SetUri sets field value
|
|
func (o *IntakeCatalog) SetUri(v IntakeCatalogGetUriRetType) {
|
|
setIntakeCatalogGetUriAttributeType(&o.Uri, v)
|
|
}
|
|
|
|
// GetWarehouse returns the Warehouse field value
|
|
func (o *IntakeCatalog) GetWarehouse() (ret IntakeCatalogGetWarehouseRetType) {
|
|
ret, _ = o.GetWarehouseOk()
|
|
return ret
|
|
}
|
|
|
|
// GetWarehouseOk returns a tuple with the Warehouse field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IntakeCatalog) GetWarehouseOk() (ret IntakeCatalogGetWarehouseRetType, ok bool) {
|
|
return getIntakeCatalogGetWarehouseAttributeTypeOk(o.Warehouse)
|
|
}
|
|
|
|
// SetWarehouse sets field value
|
|
func (o *IntakeCatalog) SetWarehouse(v IntakeCatalogGetWarehouseRetType) {
|
|
setIntakeCatalogGetWarehouseAttributeType(&o.Warehouse, v)
|
|
}
|
|
|
|
func (o IntakeCatalog) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getIntakeCatalogGetAuthAttributeTypeOk(o.Auth); ok {
|
|
toSerialize["Auth"] = val
|
|
}
|
|
if val, ok := getIntakeCatalogGetNamespaceAttributeTypeOk(o.Namespace); ok {
|
|
toSerialize["Namespace"] = val
|
|
}
|
|
if val, ok := getIntakeCatalogGetPartitionByAttributeTypeOk(o.PartitionBy); ok {
|
|
toSerialize["PartitionBy"] = val
|
|
}
|
|
if val, ok := getIntakeCatalogGetPartitioningAttributeTypeOk(o.Partitioning); ok {
|
|
toSerialize["Partitioning"] = val
|
|
}
|
|
if val, ok := getIntakeCatalogGetTableNameAttributeTypeOk(o.TableName); ok {
|
|
toSerialize["TableName"] = val
|
|
}
|
|
if val, ok := getIntakeCatalogGetUriAttributeTypeOk(o.Uri); ok {
|
|
toSerialize["Uri"] = val
|
|
}
|
|
if val, ok := getIntakeCatalogGetWarehouseAttributeTypeOk(o.Warehouse); ok {
|
|
toSerialize["Warehouse"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableIntakeCatalog struct {
|
|
value *IntakeCatalog
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableIntakeCatalog) Get() *IntakeCatalog {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableIntakeCatalog) Set(val *IntakeCatalog) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableIntakeCatalog) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableIntakeCatalog) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableIntakeCatalog(val *IntakeCatalog) *NullableIntakeCatalog {
|
|
return &NullableIntakeCatalog{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableIntakeCatalog) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableIntakeCatalog) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|