diff --git a/services/stackitmarketplace/api_default.go b/services/stackitmarketplace/api_default.go index f3540930f..63ffb4e73 100644 --- a/services/stackitmarketplace/api_default.go +++ b/services/stackitmarketplace/api_default.go @@ -79,7 +79,7 @@ type DefaultApi interface { GetVendorSubscriptionExecute(ctx context.Context, projectId string, subscriptionId string) (*VendorSubscription, error) /* InquiriesCreateInquiry Create inquiry - Create an inquiry to contact sales, become a vendor, or suggest a product. Requests are limited to 10 per 5 minutes. + Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiInquiriesCreateInquiryRequest @@ -894,7 +894,7 @@ func (r InquiriesCreateInquiryRequest) Execute() error { /* InquiriesCreateInquiry: Create inquiry -Create an inquiry to contact sales, become a vendor, or suggest a product. Requests are limited to 10 per 5 minutes. +Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiInquiriesCreateInquiryRequest diff --git a/services/stackitmarketplace/model_inquiries_create_inquiry_payload.go b/services/stackitmarketplace/model_inquiries_create_inquiry_payload.go index 5f83118f8..6fb462cb2 100644 --- a/services/stackitmarketplace/model_inquiries_create_inquiry_payload.go +++ b/services/stackitmarketplace/model_inquiries_create_inquiry_payload.go @@ -17,10 +17,11 @@ import ( // InquiriesCreateInquiryPayload - struct for InquiriesCreateInquiryPayload type InquiriesCreateInquiryPayload struct { - BecomeVendor *BecomeVendor - ContactSales *ContactSales - RegisterTesting *RegisterTesting - SuggestProduct *SuggestProduct + BecomeVendor *BecomeVendor + ContactSales *ContactSales + RegisterTesting *RegisterTesting + RequestPrivatePlan *RequestPrivatePlan + SuggestProduct *SuggestProduct } // BecomeVendorAsInquiriesCreateInquiryPayload is a convenience function that returns BecomeVendor wrapped in InquiriesCreateInquiryPayload @@ -44,6 +45,13 @@ func RegisterTestingAsInquiriesCreateInquiryPayload(v *RegisterTesting) Inquirie } } +// RequestPrivatePlanAsInquiriesCreateInquiryPayload is a convenience function that returns RequestPrivatePlan wrapped in InquiriesCreateInquiryPayload +func RequestPrivatePlanAsInquiriesCreateInquiryPayload(v *RequestPrivatePlan) InquiriesCreateInquiryPayload { + return InquiriesCreateInquiryPayload{ + RequestPrivatePlan: v, + } +} + // SuggestProductAsInquiriesCreateInquiryPayload is a convenience function that returns SuggestProduct wrapped in InquiriesCreateInquiryPayload func SuggestProductAsInquiriesCreateInquiryPayload(v *SuggestProduct) InquiriesCreateInquiryPayload { return InquiriesCreateInquiryPayload{ @@ -91,13 +99,24 @@ func (dst *InquiriesCreateInquiryPayload) UnmarshalJSON(data []byte) error { } } - // try to unmarshal data into RegisterTesting + // try to unmarshal data into RequestPrivatePlan dstInquiriesCreateInquiryPayload4 := &InquiriesCreateInquiryPayload{} - err = json.Unmarshal(data, &dstInquiriesCreateInquiryPayload4.RegisterTesting) + err = json.Unmarshal(data, &dstInquiriesCreateInquiryPayload4.RequestPrivatePlan) if err == nil { - jsonRegisterTesting, _ := json.Marshal(&dstInquiriesCreateInquiryPayload4.RegisterTesting) + jsonRequestPrivatePlan, _ := json.Marshal(&dstInquiriesCreateInquiryPayload4.RequestPrivatePlan) + if string(jsonRequestPrivatePlan) != "{}" { // empty struct + dst.RequestPrivatePlan = dstInquiriesCreateInquiryPayload4.RequestPrivatePlan + match++ + } + } + + // try to unmarshal data into RegisterTesting + dstInquiriesCreateInquiryPayload5 := &InquiriesCreateInquiryPayload{} + err = json.Unmarshal(data, &dstInquiriesCreateInquiryPayload5.RegisterTesting) + if err == nil { + jsonRegisterTesting, _ := json.Marshal(&dstInquiriesCreateInquiryPayload5.RegisterTesting) if string(jsonRegisterTesting) != "{}" { // empty struct - dst.RegisterTesting = dstInquiriesCreateInquiryPayload4.RegisterTesting + dst.RegisterTesting = dstInquiriesCreateInquiryPayload5.RegisterTesting match++ } } @@ -107,6 +126,7 @@ func (dst *InquiriesCreateInquiryPayload) UnmarshalJSON(data []byte) error { dst.BecomeVendor = nil dst.ContactSales = nil dst.RegisterTesting = nil + dst.RequestPrivatePlan = nil dst.SuggestProduct = nil return fmt.Errorf("data matches more than one schema in oneOf(InquiriesCreateInquiryPayload)") @@ -131,6 +151,10 @@ func (src InquiriesCreateInquiryPayload) MarshalJSON() ([]byte, error) { return json.Marshal(&src.RegisterTesting) } + if src.RequestPrivatePlan != nil { + return json.Marshal(&src.RequestPrivatePlan) + } + if src.SuggestProduct != nil { return json.Marshal(&src.SuggestProduct) } @@ -155,6 +179,10 @@ func (obj *InquiriesCreateInquiryPayload) GetActualInstance() interface{} { return obj.RegisterTesting } + if obj.RequestPrivatePlan != nil { + return obj.RequestPrivatePlan + } + if obj.SuggestProduct != nil { return obj.SuggestProduct } diff --git a/services/stackitmarketplace/model_inquiry_form_type.go b/services/stackitmarketplace/model_inquiry_form_type.go index 2f19d59fd..53dcf09e6 100644 --- a/services/stackitmarketplace/model_inquiry_form_type.go +++ b/services/stackitmarketplace/model_inquiry_form_type.go @@ -20,10 +20,11 @@ type InquiryFormType string // List of inquiryFormType const ( - INQUIRYFORMTYPE_SUGGEST_PRODUCT InquiryFormType = "SUGGEST_PRODUCT" - INQUIRYFORMTYPE_CONTACT_SALES InquiryFormType = "CONTACT_SALES" - INQUIRYFORMTYPE_BECOME_VENDOR InquiryFormType = "BECOME_VENDOR" - INQUIRYFORMTYPE_REGISTER_TESTING InquiryFormType = "REGISTER_TESTING" + INQUIRYFORMTYPE_SUGGEST_PRODUCT InquiryFormType = "SUGGEST_PRODUCT" + INQUIRYFORMTYPE_CONTACT_SALES InquiryFormType = "CONTACT_SALES" + INQUIRYFORMTYPE_BECOME_VENDOR InquiryFormType = "BECOME_VENDOR" + INQUIRYFORMTYPE_REGISTER_TESTING InquiryFormType = "REGISTER_TESTING" + INQUIRYFORMTYPE_REQUEST_PRIVATE_PLAN InquiryFormType = "REQUEST_PRIVATE_PLAN" ) // All allowed values of InquiryFormType enum @@ -32,6 +33,7 @@ var AllowedInquiryFormTypeEnumValues = []InquiryFormType{ "CONTACT_SALES", "BECOME_VENDOR", "REGISTER_TESTING", + "REQUEST_PRIVATE_PLAN", } func (v *InquiryFormType) UnmarshalJSON(src []byte) error { diff --git a/services/stackitmarketplace/model_inquiry_request_private_plan.go b/services/stackitmarketplace/model_inquiry_request_private_plan.go new file mode 100644 index 000000000..9008f4a90 --- /dev/null +++ b/services/stackitmarketplace/model_inquiry_request_private_plan.go @@ -0,0 +1,307 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackitmarketplace + +import ( + "encoding/json" +) + +// checks if the InquiryRequestPrivatePlan type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InquiryRequestPrivatePlan{} + +/* + types and functions for companyName +*/ + +// isNotNullableString +type InquiryRequestPrivatePlanGetCompanyNameAttributeType = *string + +func getInquiryRequestPrivatePlanGetCompanyNameAttributeTypeOk(arg InquiryRequestPrivatePlanGetCompanyNameAttributeType) (ret InquiryRequestPrivatePlanGetCompanyNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryRequestPrivatePlanGetCompanyNameAttributeType(arg *InquiryRequestPrivatePlanGetCompanyNameAttributeType, val InquiryRequestPrivatePlanGetCompanyNameRetType) { + *arg = &val +} + +type InquiryRequestPrivatePlanGetCompanyNameArgType = string +type InquiryRequestPrivatePlanGetCompanyNameRetType = string + +/* + types and functions for contactEmail +*/ + +// isNotNullableString +type InquiryRequestPrivatePlanGetContactEmailAttributeType = *string + +func getInquiryRequestPrivatePlanGetContactEmailAttributeTypeOk(arg InquiryRequestPrivatePlanGetContactEmailAttributeType) (ret InquiryRequestPrivatePlanGetContactEmailRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryRequestPrivatePlanGetContactEmailAttributeType(arg *InquiryRequestPrivatePlanGetContactEmailAttributeType, val InquiryRequestPrivatePlanGetContactEmailRetType) { + *arg = &val +} + +type InquiryRequestPrivatePlanGetContactEmailArgType = string +type InquiryRequestPrivatePlanGetContactEmailRetType = string + +/* + types and functions for fullName +*/ + +// isNotNullableString +type InquiryRequestPrivatePlanGetFullNameAttributeType = *string + +func getInquiryRequestPrivatePlanGetFullNameAttributeTypeOk(arg InquiryRequestPrivatePlanGetFullNameAttributeType) (ret InquiryRequestPrivatePlanGetFullNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryRequestPrivatePlanGetFullNameAttributeType(arg *InquiryRequestPrivatePlanGetFullNameAttributeType, val InquiryRequestPrivatePlanGetFullNameRetType) { + *arg = &val +} + +type InquiryRequestPrivatePlanGetFullNameArgType = string +type InquiryRequestPrivatePlanGetFullNameRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +type InquiryRequestPrivatePlanGetMessageAttributeType = *string + +func getInquiryRequestPrivatePlanGetMessageAttributeTypeOk(arg InquiryRequestPrivatePlanGetMessageAttributeType) (ret InquiryRequestPrivatePlanGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryRequestPrivatePlanGetMessageAttributeType(arg *InquiryRequestPrivatePlanGetMessageAttributeType, val InquiryRequestPrivatePlanGetMessageRetType) { + *arg = &val +} + +type InquiryRequestPrivatePlanGetMessageArgType = string +type InquiryRequestPrivatePlanGetMessageRetType = string + +/* + types and functions for productId +*/ + +// isNotNullableString +type InquiryRequestPrivatePlanGetProductIdAttributeType = *string + +func getInquiryRequestPrivatePlanGetProductIdAttributeTypeOk(arg InquiryRequestPrivatePlanGetProductIdAttributeType) (ret InquiryRequestPrivatePlanGetProductIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryRequestPrivatePlanGetProductIdAttributeType(arg *InquiryRequestPrivatePlanGetProductIdAttributeType, val InquiryRequestPrivatePlanGetProductIdRetType) { + *arg = &val +} + +type InquiryRequestPrivatePlanGetProductIdArgType = string +type InquiryRequestPrivatePlanGetProductIdRetType = string + +// InquiryRequestPrivatePlan Request a private plan. +type InquiryRequestPrivatePlan struct { + // The product's vendor name. + // REQUIRED + CompanyName InquiryRequestPrivatePlanGetCompanyNameAttributeType `json:"companyName" required:"true"` + // A e-mail address. + // REQUIRED + ContactEmail InquiryRequestPrivatePlanGetContactEmailAttributeType `json:"contactEmail" required:"true"` + // The full name of the contact person. + // REQUIRED + FullName InquiryRequestPrivatePlanGetFullNameAttributeType `json:"fullName" required:"true"` + // A custom message. + // REQUIRED + Message InquiryRequestPrivatePlanGetMessageAttributeType `json:"message" required:"true"` + // The user-readable product ID. + // REQUIRED + ProductId InquiryRequestPrivatePlanGetProductIdAttributeType `json:"productId" required:"true"` +} + +type _InquiryRequestPrivatePlan InquiryRequestPrivatePlan + +// NewInquiryRequestPrivatePlan instantiates a new InquiryRequestPrivatePlan 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 NewInquiryRequestPrivatePlan(companyName InquiryRequestPrivatePlanGetCompanyNameArgType, contactEmail InquiryRequestPrivatePlanGetContactEmailArgType, fullName InquiryRequestPrivatePlanGetFullNameArgType, message InquiryRequestPrivatePlanGetMessageArgType, productId InquiryRequestPrivatePlanGetProductIdArgType) *InquiryRequestPrivatePlan { + this := InquiryRequestPrivatePlan{} + setInquiryRequestPrivatePlanGetCompanyNameAttributeType(&this.CompanyName, companyName) + setInquiryRequestPrivatePlanGetContactEmailAttributeType(&this.ContactEmail, contactEmail) + setInquiryRequestPrivatePlanGetFullNameAttributeType(&this.FullName, fullName) + setInquiryRequestPrivatePlanGetMessageAttributeType(&this.Message, message) + setInquiryRequestPrivatePlanGetProductIdAttributeType(&this.ProductId, productId) + return &this +} + +// NewInquiryRequestPrivatePlanWithDefaults instantiates a new InquiryRequestPrivatePlan 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 NewInquiryRequestPrivatePlanWithDefaults() *InquiryRequestPrivatePlan { + this := InquiryRequestPrivatePlan{} + return &this +} + +// GetCompanyName returns the CompanyName field value +func (o *InquiryRequestPrivatePlan) GetCompanyName() (ret InquiryRequestPrivatePlanGetCompanyNameRetType) { + ret, _ = o.GetCompanyNameOk() + return ret +} + +// GetCompanyNameOk returns a tuple with the CompanyName field value +// and a boolean to check if the value has been set. +func (o *InquiryRequestPrivatePlan) GetCompanyNameOk() (ret InquiryRequestPrivatePlanGetCompanyNameRetType, ok bool) { + return getInquiryRequestPrivatePlanGetCompanyNameAttributeTypeOk(o.CompanyName) +} + +// SetCompanyName sets field value +func (o *InquiryRequestPrivatePlan) SetCompanyName(v InquiryRequestPrivatePlanGetCompanyNameRetType) { + setInquiryRequestPrivatePlanGetCompanyNameAttributeType(&o.CompanyName, v) +} + +// GetContactEmail returns the ContactEmail field value +func (o *InquiryRequestPrivatePlan) GetContactEmail() (ret InquiryRequestPrivatePlanGetContactEmailRetType) { + ret, _ = o.GetContactEmailOk() + return ret +} + +// GetContactEmailOk returns a tuple with the ContactEmail field value +// and a boolean to check if the value has been set. +func (o *InquiryRequestPrivatePlan) GetContactEmailOk() (ret InquiryRequestPrivatePlanGetContactEmailRetType, ok bool) { + return getInquiryRequestPrivatePlanGetContactEmailAttributeTypeOk(o.ContactEmail) +} + +// SetContactEmail sets field value +func (o *InquiryRequestPrivatePlan) SetContactEmail(v InquiryRequestPrivatePlanGetContactEmailRetType) { + setInquiryRequestPrivatePlanGetContactEmailAttributeType(&o.ContactEmail, v) +} + +// GetFullName returns the FullName field value +func (o *InquiryRequestPrivatePlan) GetFullName() (ret InquiryRequestPrivatePlanGetFullNameRetType) { + ret, _ = o.GetFullNameOk() + return ret +} + +// GetFullNameOk returns a tuple with the FullName field value +// and a boolean to check if the value has been set. +func (o *InquiryRequestPrivatePlan) GetFullNameOk() (ret InquiryRequestPrivatePlanGetFullNameRetType, ok bool) { + return getInquiryRequestPrivatePlanGetFullNameAttributeTypeOk(o.FullName) +} + +// SetFullName sets field value +func (o *InquiryRequestPrivatePlan) SetFullName(v InquiryRequestPrivatePlanGetFullNameRetType) { + setInquiryRequestPrivatePlanGetFullNameAttributeType(&o.FullName, v) +} + +// GetMessage returns the Message field value +func (o *InquiryRequestPrivatePlan) GetMessage() (ret InquiryRequestPrivatePlanGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *InquiryRequestPrivatePlan) GetMessageOk() (ret InquiryRequestPrivatePlanGetMessageRetType, ok bool) { + return getInquiryRequestPrivatePlanGetMessageAttributeTypeOk(o.Message) +} + +// SetMessage sets field value +func (o *InquiryRequestPrivatePlan) SetMessage(v InquiryRequestPrivatePlanGetMessageRetType) { + setInquiryRequestPrivatePlanGetMessageAttributeType(&o.Message, v) +} + +// GetProductId returns the ProductId field value +func (o *InquiryRequestPrivatePlan) GetProductId() (ret InquiryRequestPrivatePlanGetProductIdRetType) { + ret, _ = o.GetProductIdOk() + return ret +} + +// GetProductIdOk returns a tuple with the ProductId field value +// and a boolean to check if the value has been set. +func (o *InquiryRequestPrivatePlan) GetProductIdOk() (ret InquiryRequestPrivatePlanGetProductIdRetType, ok bool) { + return getInquiryRequestPrivatePlanGetProductIdAttributeTypeOk(o.ProductId) +} + +// SetProductId sets field value +func (o *InquiryRequestPrivatePlan) SetProductId(v InquiryRequestPrivatePlanGetProductIdRetType) { + setInquiryRequestPrivatePlanGetProductIdAttributeType(&o.ProductId, v) +} + +func (o InquiryRequestPrivatePlan) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getInquiryRequestPrivatePlanGetCompanyNameAttributeTypeOk(o.CompanyName); ok { + toSerialize["CompanyName"] = val + } + if val, ok := getInquiryRequestPrivatePlanGetContactEmailAttributeTypeOk(o.ContactEmail); ok { + toSerialize["ContactEmail"] = val + } + if val, ok := getInquiryRequestPrivatePlanGetFullNameAttributeTypeOk(o.FullName); ok { + toSerialize["FullName"] = val + } + if val, ok := getInquiryRequestPrivatePlanGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + if val, ok := getInquiryRequestPrivatePlanGetProductIdAttributeTypeOk(o.ProductId); ok { + toSerialize["ProductId"] = val + } + return toSerialize, nil +} + +type NullableInquiryRequestPrivatePlan struct { + value *InquiryRequestPrivatePlan + isSet bool +} + +func (v NullableInquiryRequestPrivatePlan) Get() *InquiryRequestPrivatePlan { + return v.value +} + +func (v *NullableInquiryRequestPrivatePlan) Set(val *InquiryRequestPrivatePlan) { + v.value = val + v.isSet = true +} + +func (v NullableInquiryRequestPrivatePlan) IsSet() bool { + return v.isSet +} + +func (v *NullableInquiryRequestPrivatePlan) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInquiryRequestPrivatePlan(val *InquiryRequestPrivatePlan) *NullableInquiryRequestPrivatePlan { + return &NullableInquiryRequestPrivatePlan{value: val, isSet: true} +} + +func (v NullableInquiryRequestPrivatePlan) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInquiryRequestPrivatePlan) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_inquiry_request_private_plan_test.go b/services/stackitmarketplace/model_inquiry_request_private_plan_test.go new file mode 100644 index 000000000..8d52b2c3c --- /dev/null +++ b/services/stackitmarketplace/model_inquiry_request_private_plan_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackitmarketplace diff --git a/services/stackitmarketplace/model_request_private_plan.go b/services/stackitmarketplace/model_request_private_plan.go new file mode 100644 index 000000000..6e16df346 --- /dev/null +++ b/services/stackitmarketplace/model_request_private_plan.go @@ -0,0 +1,168 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackitmarketplace + +import ( + "encoding/json" +) + +// checks if the RequestPrivatePlan type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RequestPrivatePlan{} + +/* + types and functions for requestPrivatePlan +*/ + +// isModel +type RequestPrivatePlanGetRequestPrivatePlanAttributeType = *InquiryRequestPrivatePlan +type RequestPrivatePlanGetRequestPrivatePlanArgType = InquiryRequestPrivatePlan +type RequestPrivatePlanGetRequestPrivatePlanRetType = InquiryRequestPrivatePlan + +func getRequestPrivatePlanGetRequestPrivatePlanAttributeTypeOk(arg RequestPrivatePlanGetRequestPrivatePlanAttributeType) (ret RequestPrivatePlanGetRequestPrivatePlanRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRequestPrivatePlanGetRequestPrivatePlanAttributeType(arg *RequestPrivatePlanGetRequestPrivatePlanAttributeType, val RequestPrivatePlanGetRequestPrivatePlanRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isEnumRef +type RequestPrivatePlanGetTypeAttributeType = *InquiryFormType +type RequestPrivatePlanGetTypeArgType = InquiryFormType +type RequestPrivatePlanGetTypeRetType = InquiryFormType + +func getRequestPrivatePlanGetTypeAttributeTypeOk(arg RequestPrivatePlanGetTypeAttributeType) (ret RequestPrivatePlanGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRequestPrivatePlanGetTypeAttributeType(arg *RequestPrivatePlanGetTypeAttributeType, val RequestPrivatePlanGetTypeRetType) { + *arg = &val +} + +// RequestPrivatePlan Request a private plan. +type RequestPrivatePlan struct { + // REQUIRED + RequestPrivatePlan RequestPrivatePlanGetRequestPrivatePlanAttributeType `json:"requestPrivatePlan" required:"true"` + // REQUIRED + Type RequestPrivatePlanGetTypeAttributeType `json:"type" required:"true"` +} + +type _RequestPrivatePlan RequestPrivatePlan + +// NewRequestPrivatePlan instantiates a new RequestPrivatePlan 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 NewRequestPrivatePlan(requestPrivatePlan RequestPrivatePlanGetRequestPrivatePlanArgType, types RequestPrivatePlanGetTypeArgType) *RequestPrivatePlan { + this := RequestPrivatePlan{} + setRequestPrivatePlanGetRequestPrivatePlanAttributeType(&this.RequestPrivatePlan, requestPrivatePlan) + setRequestPrivatePlanGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewRequestPrivatePlanWithDefaults instantiates a new RequestPrivatePlan 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 NewRequestPrivatePlanWithDefaults() *RequestPrivatePlan { + this := RequestPrivatePlan{} + return &this +} + +// GetRequestPrivatePlan returns the RequestPrivatePlan field value +func (o *RequestPrivatePlan) GetRequestPrivatePlan() (ret RequestPrivatePlanGetRequestPrivatePlanRetType) { + ret, _ = o.GetRequestPrivatePlanOk() + return ret +} + +// GetRequestPrivatePlanOk returns a tuple with the RequestPrivatePlan field value +// and a boolean to check if the value has been set. +func (o *RequestPrivatePlan) GetRequestPrivatePlanOk() (ret RequestPrivatePlanGetRequestPrivatePlanRetType, ok bool) { + return getRequestPrivatePlanGetRequestPrivatePlanAttributeTypeOk(o.RequestPrivatePlan) +} + +// SetRequestPrivatePlan sets field value +func (o *RequestPrivatePlan) SetRequestPrivatePlan(v RequestPrivatePlanGetRequestPrivatePlanRetType) { + setRequestPrivatePlanGetRequestPrivatePlanAttributeType(&o.RequestPrivatePlan, v) +} + +// GetType returns the Type field value +func (o *RequestPrivatePlan) GetType() (ret RequestPrivatePlanGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *RequestPrivatePlan) GetTypeOk() (ret RequestPrivatePlanGetTypeRetType, ok bool) { + return getRequestPrivatePlanGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *RequestPrivatePlan) SetType(v RequestPrivatePlanGetTypeRetType) { + setRequestPrivatePlanGetTypeAttributeType(&o.Type, v) +} + +func (o RequestPrivatePlan) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getRequestPrivatePlanGetRequestPrivatePlanAttributeTypeOk(o.RequestPrivatePlan); ok { + toSerialize["RequestPrivatePlan"] = val + } + if val, ok := getRequestPrivatePlanGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableRequestPrivatePlan struct { + value *RequestPrivatePlan + isSet bool +} + +func (v NullableRequestPrivatePlan) Get() *RequestPrivatePlan { + return v.value +} + +func (v *NullableRequestPrivatePlan) Set(val *RequestPrivatePlan) { + v.value = val + v.isSet = true +} + +func (v NullableRequestPrivatePlan) IsSet() bool { + return v.isSet +} + +func (v *NullableRequestPrivatePlan) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRequestPrivatePlan(val *RequestPrivatePlan) *NullableRequestPrivatePlan { + return &NullableRequestPrivatePlan{value: val, isSet: true} +} + +func (v NullableRequestPrivatePlan) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRequestPrivatePlan) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_request_private_plan_test.go b/services/stackitmarketplace/model_request_private_plan_test.go new file mode 100644 index 000000000..8d52b2c3c --- /dev/null +++ b/services/stackitmarketplace/model_request_private_plan_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackitmarketplace