feat: generating code
This commit is contained in:
parent
c329d58970
commit
51663cd8d0
1221 changed files with 271709 additions and 2444 deletions
176
pkg/iaasbeta/model_set_image_share_payload.go
Normal file
176
pkg/iaasbeta/model_set_image_share_payload.go
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the SetImageSharePayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &SetImageSharePayload{}
|
||||
|
||||
/*
|
||||
types and functions for parentOrganization
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type SetImageSharePayloadgetParentOrganizationAttributeType = *bool
|
||||
type SetImageSharePayloadgetParentOrganizationArgType = bool
|
||||
type SetImageSharePayloadgetParentOrganizationRetType = bool
|
||||
|
||||
func getSetImageSharePayloadgetParentOrganizationAttributeTypeOk(arg SetImageSharePayloadgetParentOrganizationAttributeType) (ret SetImageSharePayloadgetParentOrganizationRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setSetImageSharePayloadgetParentOrganizationAttributeType(arg *SetImageSharePayloadgetParentOrganizationAttributeType, val SetImageSharePayloadgetParentOrganizationRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for projects
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type SetImageSharePayloadGetProjectsAttributeType = *[]string
|
||||
type SetImageSharePayloadGetProjectsArgType = []string
|
||||
type SetImageSharePayloadGetProjectsRetType = []string
|
||||
|
||||
func getSetImageSharePayloadGetProjectsAttributeTypeOk(arg SetImageSharePayloadGetProjectsAttributeType) (ret SetImageSharePayloadGetProjectsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setSetImageSharePayloadGetProjectsAttributeType(arg *SetImageSharePayloadGetProjectsAttributeType, val SetImageSharePayloadGetProjectsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// SetImageSharePayload Share details of an Image. For requests ParentOrganization and Projects are mutually exclusive.
|
||||
type SetImageSharePayload struct {
|
||||
// Image is shared with all projects inside the image owners organization.
|
||||
ParentOrganization SetImageSharePayloadgetParentOrganizationAttributeType `json:"parentOrganization,omitempty"`
|
||||
// List of all projects the Image is shared with.
|
||||
Projects SetImageSharePayloadGetProjectsAttributeType `json:"projects,omitempty"`
|
||||
}
|
||||
|
||||
// NewSetImageSharePayload instantiates a new SetImageSharePayload 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 NewSetImageSharePayload() *SetImageSharePayload {
|
||||
this := SetImageSharePayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewSetImageSharePayloadWithDefaults instantiates a new SetImageSharePayload 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 NewSetImageSharePayloadWithDefaults() *SetImageSharePayload {
|
||||
this := SetImageSharePayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetParentOrganization returns the ParentOrganization field value if set, zero value otherwise.
|
||||
func (o *SetImageSharePayload) GetParentOrganization() (res SetImageSharePayloadgetParentOrganizationRetType) {
|
||||
res, _ = o.GetParentOrganizationOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetParentOrganizationOk returns a tuple with the ParentOrganization field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SetImageSharePayload) GetParentOrganizationOk() (ret SetImageSharePayloadgetParentOrganizationRetType, ok bool) {
|
||||
return getSetImageSharePayloadgetParentOrganizationAttributeTypeOk(o.ParentOrganization)
|
||||
}
|
||||
|
||||
// HasParentOrganization returns a boolean if a field has been set.
|
||||
func (o *SetImageSharePayload) HasParentOrganization() bool {
|
||||
_, ok := o.GetParentOrganizationOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetParentOrganization gets a reference to the given bool and assigns it to the ParentOrganization field.
|
||||
func (o *SetImageSharePayload) SetParentOrganization(v SetImageSharePayloadgetParentOrganizationRetType) {
|
||||
setSetImageSharePayloadgetParentOrganizationAttributeType(&o.ParentOrganization, v)
|
||||
}
|
||||
|
||||
// GetProjects returns the Projects field value if set, zero value otherwise.
|
||||
func (o *SetImageSharePayload) GetProjects() (res SetImageSharePayloadGetProjectsRetType) {
|
||||
res, _ = o.GetProjectsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetProjectsOk returns a tuple with the Projects field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SetImageSharePayload) GetProjectsOk() (ret SetImageSharePayloadGetProjectsRetType, ok bool) {
|
||||
return getSetImageSharePayloadGetProjectsAttributeTypeOk(o.Projects)
|
||||
}
|
||||
|
||||
// HasProjects returns a boolean if a field has been set.
|
||||
func (o *SetImageSharePayload) HasProjects() bool {
|
||||
_, ok := o.GetProjectsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetProjects gets a reference to the given []string and assigns it to the Projects field.
|
||||
func (o *SetImageSharePayload) SetProjects(v SetImageSharePayloadGetProjectsRetType) {
|
||||
setSetImageSharePayloadGetProjectsAttributeType(&o.Projects, v)
|
||||
}
|
||||
|
||||
func (o SetImageSharePayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getSetImageSharePayloadgetParentOrganizationAttributeTypeOk(o.ParentOrganization); ok {
|
||||
toSerialize["ParentOrganization"] = val
|
||||
}
|
||||
if val, ok := getSetImageSharePayloadGetProjectsAttributeTypeOk(o.Projects); ok {
|
||||
toSerialize["Projects"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableSetImageSharePayload struct {
|
||||
value *SetImageSharePayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableSetImageSharePayload) Get() *SetImageSharePayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableSetImageSharePayload) Set(val *SetImageSharePayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableSetImageSharePayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableSetImageSharePayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableSetImageSharePayload(val *SetImageSharePayload) *NullableSetImageSharePayload {
|
||||
return &NullableSetImageSharePayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableSetImageSharePayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableSetImageSharePayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue