diff --git a/services/stackitmarketplace/api_default_test.go b/services/stackitmarketplace/api_default_test.go index 46a84f773..430672e92 100644 --- a/services/stackitmarketplace/api_default_test.go +++ b/services/stackitmarketplace/api_default_test.go @@ -18,20 +18,21 @@ import ( "strings" "testing" + "github.com/google/uuid" "github.com/stackitcloud/stackit-sdk-go/core/config" ) func Test_stackitmarketplace_DefaultApiService(t *testing.T) { t.Run("Test DefaultApiService ApproveSubscription", func(t *testing.T) { - path := "/v1/vendors/projects/{projectId}/subscriptions/{subscriptionId}/approve" - projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - subscriptionIdValue := "subscriptionId" - path = strings.Replace(path, "{"+"subscriptionId"+"}", url.PathEscape(ParameterValueToString(subscriptionIdValue, "subscriptionId")), -1) + _apiUrlPath := "/v1/vendors/projects/{projectId}/subscriptions/{subscriptionId}/approve" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + subscriptionIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"subscriptionId"+"}", url.PathEscape(ParameterValueToString(subscriptionIdValue, "subscriptionId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { }) testServer := httptest.NewServer(testDefaultApiServeMux) defer testServer.Close() @@ -62,8 +63,8 @@ func Test_stackitmarketplace_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - subscriptionId := "subscriptionId" + projectId := projectIdValue + subscriptionId := subscriptionIdValue reqErr := apiClient.ApproveSubscription(context.Background(), projectId, subscriptionId).Execute() @@ -73,12 +74,12 @@ func Test_stackitmarketplace_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService GetCatalogProduct", func(t *testing.T) { - path := "/v1/catalog/products/{productId}" - productIdValue := "productId" - path = strings.Replace(path, "{"+"productId"+"}", url.PathEscape(ParameterValueToString(productIdValue, "productId")), -1) + _apiUrlPath := "/v1/catalog/products/{productId}" + productIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"productId"+"}", url.PathEscape(ParameterValueToString(productIdValue, "productId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := CatalogProductDetail{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -112,27 +113,27 @@ func Test_stackitmarketplace_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - productId := "productId" + productId := productIdValue resp, reqErr := apiClient.GetCatalogProduct(context.Background(), productId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService GetVendorSubscription", func(t *testing.T) { - path := "/v1/vendors/projects/{projectId}/subscriptions/{subscriptionId}" - projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - subscriptionIdValue := "subscriptionId" - path = strings.Replace(path, "{"+"subscriptionId"+"}", url.PathEscape(ParameterValueToString(subscriptionIdValue, "subscriptionId")), -1) + _apiUrlPath := "/v1/vendors/projects/{projectId}/subscriptions/{subscriptionId}" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + subscriptionIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"subscriptionId"+"}", url.PathEscape(ParameterValueToString(subscriptionIdValue, "subscriptionId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := VendorSubscription{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -166,24 +167,24 @@ func Test_stackitmarketplace_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - subscriptionId := "subscriptionId" + projectId := projectIdValue + subscriptionId := subscriptionIdValue resp, reqErr := apiClient.GetVendorSubscription(context.Background(), projectId, subscriptionId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService InquiriesCreateInquiry", func(t *testing.T) { - path := "/v1/inquiries" + _apiUrlPath := "/v1/inquiries" testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { }) testServer := httptest.NewServer(testDefaultApiServeMux) defer testServer.Close() @@ -224,10 +225,10 @@ func Test_stackitmarketplace_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListCatalogProducts", func(t *testing.T) { - path := "/v1/catalog/products" + _apiUrlPath := "/v1/catalog/products" testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ListCatalogProductsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -266,18 +267,18 @@ func Test_stackitmarketplace_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService ListVendorSubscriptions", func(t *testing.T) { - path := "/v1/vendors/projects/{projectId}/subscriptions" - projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath := "/v1/vendors/projects/{projectId}/subscriptions" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ListVendorSubscriptionsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -311,25 +312,25 @@ func Test_stackitmarketplace_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" + projectId := projectIdValue resp, reqErr := apiClient.ListVendorSubscriptions(context.Background(), projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService ResolveCustomer", func(t *testing.T) { - path := "/v1/vendors/projects/{projectId}/resolve-customer" - projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath := "/v1/vendors/projects/{projectId}/resolve-customer" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := VendorSubscription{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -363,7 +364,7 @@ func Test_stackitmarketplace_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" + projectId := projectIdValue resolveCustomerPayload := ResolveCustomerPayload{} resp, reqErr := apiClient.ResolveCustomer(context.Background(), projectId).ResolveCustomerPayload(resolveCustomerPayload).Execute() @@ -371,7 +372,7 @@ func Test_stackitmarketplace_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) diff --git a/services/stackitmarketplace/go.mod b/services/stackitmarketplace/go.mod index 3a42d16f7..80f4bf58a 100644 --- a/services/stackitmarketplace/go.mod +++ b/services/stackitmarketplace/go.mod @@ -2,10 +2,12 @@ module github.com/stackitcloud/stackit-sdk-go/services/stackitmarketplace go 1.21 -require github.com/stackitcloud/stackit-sdk-go/core v0.16.0 +require ( + github.com/google/uuid v1.6.0 + github.com/stackitcloud/stackit-sdk-go/core v0.16.0 +) require ( github.com/golang-jwt/jwt/v5 v5.2.1 // indirect github.com/google/go-cmp v0.7.0 // indirect - github.com/google/uuid v1.6.0 // indirect ) diff --git a/services/stackitmarketplace/model_approve_subscription_payload.go b/services/stackitmarketplace/model_approve_subscription_payload.go index 128fcb4bc..cc3e53c86 100644 --- a/services/stackitmarketplace/model_approve_subscription_payload.go +++ b/services/stackitmarketplace/model_approve_subscription_payload.go @@ -17,10 +17,31 @@ import ( // checks if the ApproveSubscriptionPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ApproveSubscriptionPayload{} +/* + types and functions for instanceTarget +*/ + +// isNotNullableString +type ApproveSubscriptionPayloadGetInstanceTargetAttributeType = *string + +func getApproveSubscriptionPayloadGetInstanceTargetAttributeTypeOk(arg ApproveSubscriptionPayloadGetInstanceTargetAttributeType) (ret ApproveSubscriptionPayloadGetInstanceTargetRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setApproveSubscriptionPayloadGetInstanceTargetAttributeType(arg *ApproveSubscriptionPayloadGetInstanceTargetAttributeType, val ApproveSubscriptionPayloadGetInstanceTargetRetType) { + *arg = &val +} + +type ApproveSubscriptionPayloadGetInstanceTargetArgType = string +type ApproveSubscriptionPayloadGetInstanceTargetRetType = string + // ApproveSubscriptionPayload struct for ApproveSubscriptionPayload type ApproveSubscriptionPayload struct { // The target URL of the user instance, used to redirect the user to the instance after the subscription is active. - InstanceTarget *string `json:"instanceTarget,omitempty"` + InstanceTarget ApproveSubscriptionPayloadGetInstanceTargetAttributeType `json:"instanceTarget,omitempty"` } // NewApproveSubscriptionPayload instantiates a new ApproveSubscriptionPayload object @@ -41,41 +62,32 @@ func NewApproveSubscriptionPayloadWithDefaults() *ApproveSubscriptionPayload { } // GetInstanceTarget returns the InstanceTarget field value if set, zero value otherwise. -func (o *ApproveSubscriptionPayload) GetInstanceTarget() *string { - if o == nil || IsNil(o.InstanceTarget) { - var ret *string - return ret - } - return o.InstanceTarget +func (o *ApproveSubscriptionPayload) GetInstanceTarget() (res ApproveSubscriptionPayloadGetInstanceTargetRetType) { + res, _ = o.GetInstanceTargetOk() + return } // GetInstanceTargetOk returns a tuple with the InstanceTarget field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ApproveSubscriptionPayload) GetInstanceTargetOk() (*string, bool) { - if o == nil || IsNil(o.InstanceTarget) { - return nil, false - } - return o.InstanceTarget, true +func (o *ApproveSubscriptionPayload) GetInstanceTargetOk() (ret ApproveSubscriptionPayloadGetInstanceTargetRetType, ok bool) { + return getApproveSubscriptionPayloadGetInstanceTargetAttributeTypeOk(o.InstanceTarget) } // HasInstanceTarget returns a boolean if a field has been set. func (o *ApproveSubscriptionPayload) HasInstanceTarget() bool { - if o != nil && !IsNil(o.InstanceTarget) { - return true - } - - return false + _, ok := o.GetInstanceTargetOk() + return ok } // SetInstanceTarget gets a reference to the given string and assigns it to the InstanceTarget field. -func (o *ApproveSubscriptionPayload) SetInstanceTarget(v *string) { - o.InstanceTarget = v +func (o *ApproveSubscriptionPayload) SetInstanceTarget(v ApproveSubscriptionPayloadGetInstanceTargetRetType) { + setApproveSubscriptionPayloadGetInstanceTargetAttributeType(&o.InstanceTarget, v) } func (o ApproveSubscriptionPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.InstanceTarget) { - toSerialize["instanceTarget"] = o.InstanceTarget + if val, ok := getApproveSubscriptionPayloadGetInstanceTargetAttributeTypeOk(o.InstanceTarget); ok { + toSerialize["InstanceTarget"] = val } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_become_vendor.go b/services/stackitmarketplace/model_become_vendor.go index 900946f92..36f8da877 100644 --- a/services/stackitmarketplace/model_become_vendor.go +++ b/services/stackitmarketplace/model_become_vendor.go @@ -17,13 +17,53 @@ import ( // checks if the BecomeVendor type satisfies the MappedNullable interface at compile time var _ MappedNullable = &BecomeVendor{} +/* + types and functions for becomeVendor +*/ + +// isModel +type BecomeVendorGetBecomeVendorAttributeType = *BecomeVendorBecomeVendor +type BecomeVendorGetBecomeVendorArgType = BecomeVendorBecomeVendor +type BecomeVendorGetBecomeVendorRetType = BecomeVendorBecomeVendor + +func getBecomeVendorGetBecomeVendorAttributeTypeOk(arg BecomeVendorGetBecomeVendorAttributeType) (ret BecomeVendorGetBecomeVendorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBecomeVendorGetBecomeVendorAttributeType(arg *BecomeVendorGetBecomeVendorAttributeType, val BecomeVendorGetBecomeVendorRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isEnumRef +type BecomeVendorGetTypeAttributeType = *string +type BecomeVendorGetTypeArgType = string +type BecomeVendorGetTypeRetType = string + +func getBecomeVendorGetTypeAttributeTypeOk(arg BecomeVendorGetTypeAttributeType) (ret BecomeVendorGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBecomeVendorGetTypeAttributeType(arg *BecomeVendorGetTypeAttributeType, val BecomeVendorGetTypeRetType) { + *arg = &val +} + // BecomeVendor Become a vendor. type BecomeVendor struct { // REQUIRED - BecomeVendor *BecomeVendorBecomeVendor `json:"becomeVendor"` + BecomeVendor BecomeVendorGetBecomeVendorAttributeType `json:"becomeVendor"` // The form type. // REQUIRED - Type *string `json:"type"` + Type BecomeVendorGetTypeAttributeType `json:"type"` } type _BecomeVendor BecomeVendor @@ -32,10 +72,10 @@ type _BecomeVendor BecomeVendor // 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 NewBecomeVendor(becomeVendor *BecomeVendorBecomeVendor, type_ *string) *BecomeVendor { +func NewBecomeVendor(becomeVendor BecomeVendorGetBecomeVendorArgType, type_ BecomeVendorGetTypeArgType) *BecomeVendor { this := BecomeVendor{} - this.BecomeVendor = becomeVendor - this.Type = type_ + setBecomeVendorGetBecomeVendorAttributeType(&this.BecomeVendor, becomeVendor) + setBecomeVendorGetTypeAttributeType(&this.Type, type_) return &this } @@ -48,57 +88,47 @@ func NewBecomeVendorWithDefaults() *BecomeVendor { } // GetBecomeVendor returns the BecomeVendor field value -func (o *BecomeVendor) GetBecomeVendor() *BecomeVendorBecomeVendor { - if o == nil || IsNil(o.BecomeVendor) { - var ret *BecomeVendorBecomeVendor - return ret - } - - return o.BecomeVendor +func (o *BecomeVendor) GetBecomeVendor() (ret BecomeVendorGetBecomeVendorRetType) { + ret, _ = o.GetBecomeVendorOk() + return ret } // GetBecomeVendorOk returns a tuple with the BecomeVendor field value // and a boolean to check if the value has been set. -func (o *BecomeVendor) GetBecomeVendorOk() (*BecomeVendorBecomeVendor, bool) { - if o == nil { - return nil, false - } - return o.BecomeVendor, true +func (o *BecomeVendor) GetBecomeVendorOk() (ret BecomeVendorGetBecomeVendorRetType, ok bool) { + return getBecomeVendorGetBecomeVendorAttributeTypeOk(o.BecomeVendor) } // SetBecomeVendor sets field value -func (o *BecomeVendor) SetBecomeVendor(v *BecomeVendorBecomeVendor) { - o.BecomeVendor = v +func (o *BecomeVendor) SetBecomeVendor(v BecomeVendorGetBecomeVendorRetType) { + setBecomeVendorGetBecomeVendorAttributeType(&o.BecomeVendor, v) } // GetType returns the Type field value -func (o *BecomeVendor) GetType() *string { - if o == nil || IsNil(o.Type) { - var ret *string - return ret - } - - return o.Type +func (o *BecomeVendor) GetType() (ret BecomeVendorGetTypeRetType) { + 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 *BecomeVendor) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Type, true +func (o *BecomeVendor) GetTypeOk() (ret BecomeVendorGetTypeRetType, ok bool) { + return getBecomeVendorGetTypeAttributeTypeOk(o.Type) } // SetType sets field value -func (o *BecomeVendor) SetType(v *string) { - o.Type = v +func (o *BecomeVendor) SetType(v BecomeVendorGetTypeRetType) { + setBecomeVendorGetTypeAttributeType(&o.Type, v) } func (o BecomeVendor) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["becomeVendor"] = o.BecomeVendor - toSerialize["type"] = o.Type + if val, ok := getBecomeVendorGetBecomeVendorAttributeTypeOk(o.BecomeVendor); ok { + toSerialize["BecomeVendor"] = val + } + if val, ok := getBecomeVendorGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_become_vendor_become_vendor.go b/services/stackitmarketplace/model_become_vendor_become_vendor.go index 24798ab01..bba7bd3c8 100644 --- a/services/stackitmarketplace/model_become_vendor_become_vendor.go +++ b/services/stackitmarketplace/model_become_vendor_become_vendor.go @@ -17,14 +17,56 @@ import ( // checks if the BecomeVendorBecomeVendor type satisfies the MappedNullable interface at compile time var _ MappedNullable = &BecomeVendorBecomeVendor{} +/* + types and functions for contactEmail +*/ + +// isNotNullableString +type BecomeVendorBecomeVendorGetContactEmailAttributeType = *string + +func getBecomeVendorBecomeVendorGetContactEmailAttributeTypeOk(arg BecomeVendorBecomeVendorGetContactEmailAttributeType) (ret BecomeVendorBecomeVendorGetContactEmailRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBecomeVendorBecomeVendorGetContactEmailAttributeType(arg *BecomeVendorBecomeVendorGetContactEmailAttributeType, val BecomeVendorBecomeVendorGetContactEmailRetType) { + *arg = &val +} + +type BecomeVendorBecomeVendorGetContactEmailArgType = string +type BecomeVendorBecomeVendorGetContactEmailRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +type BecomeVendorBecomeVendorGetMessageAttributeType = *string + +func getBecomeVendorBecomeVendorGetMessageAttributeTypeOk(arg BecomeVendorBecomeVendorGetMessageAttributeType) (ret BecomeVendorBecomeVendorGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBecomeVendorBecomeVendorGetMessageAttributeType(arg *BecomeVendorBecomeVendorGetMessageAttributeType, val BecomeVendorBecomeVendorGetMessageRetType) { + *arg = &val +} + +type BecomeVendorBecomeVendorGetMessageArgType = string +type BecomeVendorBecomeVendorGetMessageRetType = string + // BecomeVendorBecomeVendor struct for BecomeVendorBecomeVendor type BecomeVendorBecomeVendor struct { // The contact e-mail address. // REQUIRED - ContactEmail *string `json:"contactEmail"` + ContactEmail BecomeVendorBecomeVendorGetContactEmailAttributeType `json:"contactEmail"` // The message content. // REQUIRED - Message *string `json:"message"` + Message BecomeVendorBecomeVendorGetMessageAttributeType `json:"message"` } type _BecomeVendorBecomeVendor BecomeVendorBecomeVendor @@ -33,10 +75,10 @@ type _BecomeVendorBecomeVendor BecomeVendorBecomeVendor // 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 NewBecomeVendorBecomeVendor(contactEmail *string, message *string) *BecomeVendorBecomeVendor { +func NewBecomeVendorBecomeVendor(contactEmail BecomeVendorBecomeVendorGetContactEmailArgType, message BecomeVendorBecomeVendorGetMessageArgType) *BecomeVendorBecomeVendor { this := BecomeVendorBecomeVendor{} - this.ContactEmail = contactEmail - this.Message = message + setBecomeVendorBecomeVendorGetContactEmailAttributeType(&this.ContactEmail, contactEmail) + setBecomeVendorBecomeVendorGetMessageAttributeType(&this.Message, message) return &this } @@ -49,57 +91,47 @@ func NewBecomeVendorBecomeVendorWithDefaults() *BecomeVendorBecomeVendor { } // GetContactEmail returns the ContactEmail field value -func (o *BecomeVendorBecomeVendor) GetContactEmail() *string { - if o == nil || IsNil(o.ContactEmail) { - var ret *string - return ret - } - - return o.ContactEmail +func (o *BecomeVendorBecomeVendor) GetContactEmail() (ret BecomeVendorBecomeVendorGetContactEmailRetType) { + 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 *BecomeVendorBecomeVendor) GetContactEmailOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ContactEmail, true +func (o *BecomeVendorBecomeVendor) GetContactEmailOk() (ret BecomeVendorBecomeVendorGetContactEmailRetType, ok bool) { + return getBecomeVendorBecomeVendorGetContactEmailAttributeTypeOk(o.ContactEmail) } // SetContactEmail sets field value -func (o *BecomeVendorBecomeVendor) SetContactEmail(v *string) { - o.ContactEmail = v +func (o *BecomeVendorBecomeVendor) SetContactEmail(v BecomeVendorBecomeVendorGetContactEmailRetType) { + setBecomeVendorBecomeVendorGetContactEmailAttributeType(&o.ContactEmail, v) } // GetMessage returns the Message field value -func (o *BecomeVendorBecomeVendor) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *BecomeVendorBecomeVendor) GetMessage() (ret BecomeVendorBecomeVendorGetMessageRetType) { + 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 *BecomeVendorBecomeVendor) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Message, true +func (o *BecomeVendorBecomeVendor) GetMessageOk() (ret BecomeVendorBecomeVendorGetMessageRetType, ok bool) { + return getBecomeVendorBecomeVendorGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *BecomeVendorBecomeVendor) SetMessage(v *string) { - o.Message = v +func (o *BecomeVendorBecomeVendor) SetMessage(v BecomeVendorBecomeVendorGetMessageRetType) { + setBecomeVendorBecomeVendorGetMessageAttributeType(&o.Message, v) } func (o BecomeVendorBecomeVendor) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["contactEmail"] = o.ContactEmail - toSerialize["message"] = o.Message + if val, ok := getBecomeVendorBecomeVendorGetContactEmailAttributeTypeOk(o.ContactEmail); ok { + toSerialize["ContactEmail"] = val + } + if val, ok := getBecomeVendorBecomeVendorGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_catalog_pricing_option_highlight.go b/services/stackitmarketplace/model_catalog_pricing_option_highlight.go index efe0561b1..2fb8a589b 100644 --- a/services/stackitmarketplace/model_catalog_pricing_option_highlight.go +++ b/services/stackitmarketplace/model_catalog_pricing_option_highlight.go @@ -17,10 +17,31 @@ import ( // checks if the CatalogPricingOptionHighlight type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CatalogPricingOptionHighlight{} +/* + types and functions for highlightContent +*/ + +// isNotNullableString +type CatalogPricingOptionHighlightGetHighlightContentAttributeType = *string + +func getCatalogPricingOptionHighlightGetHighlightContentAttributeTypeOk(arg CatalogPricingOptionHighlightGetHighlightContentAttributeType) (ret CatalogPricingOptionHighlightGetHighlightContentRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogPricingOptionHighlightGetHighlightContentAttributeType(arg *CatalogPricingOptionHighlightGetHighlightContentAttributeType, val CatalogPricingOptionHighlightGetHighlightContentRetType) { + *arg = &val +} + +type CatalogPricingOptionHighlightGetHighlightContentArgType = string +type CatalogPricingOptionHighlightGetHighlightContentRetType = string + // CatalogPricingOptionHighlight struct for CatalogPricingOptionHighlight type CatalogPricingOptionHighlight struct { // The highlight content. - HighlightContent *string `json:"highlightContent,omitempty"` + HighlightContent CatalogPricingOptionHighlightGetHighlightContentAttributeType `json:"highlightContent,omitempty"` } // NewCatalogPricingOptionHighlight instantiates a new CatalogPricingOptionHighlight object @@ -41,41 +62,32 @@ func NewCatalogPricingOptionHighlightWithDefaults() *CatalogPricingOptionHighlig } // GetHighlightContent returns the HighlightContent field value if set, zero value otherwise. -func (o *CatalogPricingOptionHighlight) GetHighlightContent() *string { - if o == nil || IsNil(o.HighlightContent) { - var ret *string - return ret - } - return o.HighlightContent +func (o *CatalogPricingOptionHighlight) GetHighlightContent() (res CatalogPricingOptionHighlightGetHighlightContentRetType) { + res, _ = o.GetHighlightContentOk() + return } // GetHighlightContentOk returns a tuple with the HighlightContent field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatalogPricingOptionHighlight) GetHighlightContentOk() (*string, bool) { - if o == nil || IsNil(o.HighlightContent) { - return nil, false - } - return o.HighlightContent, true +func (o *CatalogPricingOptionHighlight) GetHighlightContentOk() (ret CatalogPricingOptionHighlightGetHighlightContentRetType, ok bool) { + return getCatalogPricingOptionHighlightGetHighlightContentAttributeTypeOk(o.HighlightContent) } // HasHighlightContent returns a boolean if a field has been set. func (o *CatalogPricingOptionHighlight) HasHighlightContent() bool { - if o != nil && !IsNil(o.HighlightContent) { - return true - } - - return false + _, ok := o.GetHighlightContentOk() + return ok } // SetHighlightContent gets a reference to the given string and assigns it to the HighlightContent field. -func (o *CatalogPricingOptionHighlight) SetHighlightContent(v *string) { - o.HighlightContent = v +func (o *CatalogPricingOptionHighlight) SetHighlightContent(v CatalogPricingOptionHighlightGetHighlightContentRetType) { + setCatalogPricingOptionHighlightGetHighlightContentAttributeType(&o.HighlightContent, v) } func (o CatalogPricingOptionHighlight) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.HighlightContent) { - toSerialize["highlightContent"] = o.HighlightContent + if val, ok := getCatalogPricingOptionHighlightGetHighlightContentAttributeTypeOk(o.HighlightContent); ok { + toSerialize["HighlightContent"] = val } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_catalog_product_detail.go b/services/stackitmarketplace/model_catalog_product_detail.go index 0bd1026d9..1e0b96176 100644 --- a/services/stackitmarketplace/model_catalog_product_detail.go +++ b/services/stackitmarketplace/model_catalog_product_detail.go @@ -17,58 +17,448 @@ import ( // checks if the CatalogProductDetail type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CatalogProductDetail{} +/* + types and functions for categories +*/ + +// isArray +type CatalogProductDetailGetCategoriesAttributeType = *[]string +type CatalogProductDetailGetCategoriesArgType = []string +type CatalogProductDetailGetCategoriesRetType = []string + +func getCatalogProductDetailGetCategoriesAttributeTypeOk(arg CatalogProductDetailGetCategoriesAttributeType) (ret CatalogProductDetailGetCategoriesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetCategoriesAttributeType(arg *CatalogProductDetailGetCategoriesAttributeType, val CatalogProductDetailGetCategoriesRetType) { + *arg = &val +} + +/* + types and functions for deliveryMethod +*/ + +// isEnumRef +type CatalogProductDetailGetDeliveryMethodAttributeType = *string +type CatalogProductDetailGetDeliveryMethodArgType = string +type CatalogProductDetailGetDeliveryMethodRetType = string + +func getCatalogProductDetailGetDeliveryMethodAttributeTypeOk(arg CatalogProductDetailGetDeliveryMethodAttributeType) (ret CatalogProductDetailGetDeliveryMethodRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetDeliveryMethodAttributeType(arg *CatalogProductDetailGetDeliveryMethodAttributeType, val CatalogProductDetailGetDeliveryMethodRetType) { + *arg = &val +} + +/* + types and functions for description +*/ + +// isNotNullableString +type CatalogProductDetailGetDescriptionAttributeType = *string + +func getCatalogProductDetailGetDescriptionAttributeTypeOk(arg CatalogProductDetailGetDescriptionAttributeType) (ret CatalogProductDetailGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetDescriptionAttributeType(arg *CatalogProductDetailGetDescriptionAttributeType, val CatalogProductDetailGetDescriptionRetType) { + *arg = &val +} + +type CatalogProductDetailGetDescriptionArgType = string +type CatalogProductDetailGetDescriptionRetType = string + +/* + types and functions for documentationUrl +*/ + +// isNotNullableString +type CatalogProductDetailGetDocumentationUrlAttributeType = *string + +func getCatalogProductDetailGetDocumentationUrlAttributeTypeOk(arg CatalogProductDetailGetDocumentationUrlAttributeType) (ret CatalogProductDetailGetDocumentationUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetDocumentationUrlAttributeType(arg *CatalogProductDetailGetDocumentationUrlAttributeType, val CatalogProductDetailGetDocumentationUrlRetType) { + *arg = &val +} + +type CatalogProductDetailGetDocumentationUrlArgType = string +type CatalogProductDetailGetDocumentationUrlRetType = string + +/* + types and functions for highlights +*/ + +// isArray +type CatalogProductDetailGetHighlightsAttributeType = *[]CatalogProductHighlight +type CatalogProductDetailGetHighlightsArgType = []CatalogProductHighlight +type CatalogProductDetailGetHighlightsRetType = []CatalogProductHighlight + +func getCatalogProductDetailGetHighlightsAttributeTypeOk(arg CatalogProductDetailGetHighlightsAttributeType) (ret CatalogProductDetailGetHighlightsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetHighlightsAttributeType(arg *CatalogProductDetailGetHighlightsAttributeType, val CatalogProductDetailGetHighlightsRetType) { + *arg = &val +} + +/* + types and functions for isProductListing +*/ + +// isBoolean +type CatalogProductDetailgetIsProductListingAttributeType = *bool +type CatalogProductDetailgetIsProductListingArgType = bool +type CatalogProductDetailgetIsProductListingRetType = bool + +func getCatalogProductDetailgetIsProductListingAttributeTypeOk(arg CatalogProductDetailgetIsProductListingAttributeType) (ret CatalogProductDetailgetIsProductListingRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailgetIsProductListingAttributeType(arg *CatalogProductDetailgetIsProductListingAttributeType, val CatalogProductDetailgetIsProductListingRetType) { + *arg = &val +} + +/* + types and functions for lifecycleState +*/ + +// isEnumRef +type CatalogProductDetailGetLifecycleStateAttributeType = *string +type CatalogProductDetailGetLifecycleStateArgType = string +type CatalogProductDetailGetLifecycleStateRetType = string + +func getCatalogProductDetailGetLifecycleStateAttributeTypeOk(arg CatalogProductDetailGetLifecycleStateAttributeType) (ret CatalogProductDetailGetLifecycleStateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetLifecycleStateAttributeType(arg *CatalogProductDetailGetLifecycleStateAttributeType, val CatalogProductDetailGetLifecycleStateRetType) { + *arg = &val +} + +/* + types and functions for logo +*/ + +// isNotNullableString +type CatalogProductDetailGetLogoAttributeType = *string + +func getCatalogProductDetailGetLogoAttributeTypeOk(arg CatalogProductDetailGetLogoAttributeType) (ret CatalogProductDetailGetLogoRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetLogoAttributeType(arg *CatalogProductDetailGetLogoAttributeType, val CatalogProductDetailGetLogoRetType) { + *arg = &val +} + +type CatalogProductDetailGetLogoArgType = string +type CatalogProductDetailGetLogoRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type CatalogProductDetailGetNameAttributeType = *string + +func getCatalogProductDetailGetNameAttributeTypeOk(arg CatalogProductDetailGetNameAttributeType) (ret CatalogProductDetailGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetNameAttributeType(arg *CatalogProductDetailGetNameAttributeType, val CatalogProductDetailGetNameRetType) { + *arg = &val +} + +type CatalogProductDetailGetNameArgType = string +type CatalogProductDetailGetNameRetType = string + +/* + types and functions for pricingOptions +*/ + +// isArray +type CatalogProductDetailGetPricingOptionsAttributeType = *[]CatalogProductPricingOption +type CatalogProductDetailGetPricingOptionsArgType = []CatalogProductPricingOption +type CatalogProductDetailGetPricingOptionsRetType = []CatalogProductPricingOption + +func getCatalogProductDetailGetPricingOptionsAttributeTypeOk(arg CatalogProductDetailGetPricingOptionsAttributeType) (ret CatalogProductDetailGetPricingOptionsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetPricingOptionsAttributeType(arg *CatalogProductDetailGetPricingOptionsAttributeType, val CatalogProductDetailGetPricingOptionsRetType) { + *arg = &val +} + +/* + types and functions for productId +*/ + +// isNotNullableString +type CatalogProductDetailGetProductIdAttributeType = *string + +func getCatalogProductDetailGetProductIdAttributeTypeOk(arg CatalogProductDetailGetProductIdAttributeType) (ret CatalogProductDetailGetProductIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetProductIdAttributeType(arg *CatalogProductDetailGetProductIdAttributeType, val CatalogProductDetailGetProductIdRetType) { + *arg = &val +} + +type CatalogProductDetailGetProductIdArgType = string +type CatalogProductDetailGetProductIdRetType = string + +/* + types and functions for summary +*/ + +// isNotNullableString +type CatalogProductDetailGetSummaryAttributeType = *string + +func getCatalogProductDetailGetSummaryAttributeTypeOk(arg CatalogProductDetailGetSummaryAttributeType) (ret CatalogProductDetailGetSummaryRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetSummaryAttributeType(arg *CatalogProductDetailGetSummaryAttributeType, val CatalogProductDetailGetSummaryRetType) { + *arg = &val +} + +type CatalogProductDetailGetSummaryArgType = string +type CatalogProductDetailGetSummaryRetType = string + +/* + types and functions for supportEmail +*/ + +// isNotNullableString +type CatalogProductDetailGetSupportEmailAttributeType = *string + +func getCatalogProductDetailGetSupportEmailAttributeTypeOk(arg CatalogProductDetailGetSupportEmailAttributeType) (ret CatalogProductDetailGetSupportEmailRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetSupportEmailAttributeType(arg *CatalogProductDetailGetSupportEmailAttributeType, val CatalogProductDetailGetSupportEmailRetType) { + *arg = &val +} + +type CatalogProductDetailGetSupportEmailArgType = string +type CatalogProductDetailGetSupportEmailRetType = string + +/* + types and functions for supportFaq +*/ + +// isNotNullableString +type CatalogProductDetailGetSupportFaqAttributeType = *string + +func getCatalogProductDetailGetSupportFaqAttributeTypeOk(arg CatalogProductDetailGetSupportFaqAttributeType) (ret CatalogProductDetailGetSupportFaqRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetSupportFaqAttributeType(arg *CatalogProductDetailGetSupportFaqAttributeType, val CatalogProductDetailGetSupportFaqRetType) { + *arg = &val +} + +type CatalogProductDetailGetSupportFaqArgType = string +type CatalogProductDetailGetSupportFaqRetType = string + +/* + types and functions for supportPhone +*/ + +// isNotNullableString +type CatalogProductDetailGetSupportPhoneAttributeType = *string + +func getCatalogProductDetailGetSupportPhoneAttributeTypeOk(arg CatalogProductDetailGetSupportPhoneAttributeType) (ret CatalogProductDetailGetSupportPhoneRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetSupportPhoneAttributeType(arg *CatalogProductDetailGetSupportPhoneAttributeType, val CatalogProductDetailGetSupportPhoneRetType) { + *arg = &val +} + +type CatalogProductDetailGetSupportPhoneArgType = string +type CatalogProductDetailGetSupportPhoneRetType = string + +/* + types and functions for supportResources +*/ + +// isArray +type CatalogProductDetailGetSupportResourcesAttributeType = *[]CatalogProductSupportResource +type CatalogProductDetailGetSupportResourcesArgType = []CatalogProductSupportResource +type CatalogProductDetailGetSupportResourcesRetType = []CatalogProductSupportResource + +func getCatalogProductDetailGetSupportResourcesAttributeTypeOk(arg CatalogProductDetailGetSupportResourcesAttributeType) (ret CatalogProductDetailGetSupportResourcesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetSupportResourcesAttributeType(arg *CatalogProductDetailGetSupportResourcesAttributeType, val CatalogProductDetailGetSupportResourcesRetType) { + *arg = &val +} + +/* + types and functions for vendor +*/ + +// isModel +type CatalogProductDetailGetVendorAttributeType = *CatalogProductDetailsVendor +type CatalogProductDetailGetVendorArgType = CatalogProductDetailsVendor +type CatalogProductDetailGetVendorRetType = CatalogProductDetailsVendor + +func getCatalogProductDetailGetVendorAttributeTypeOk(arg CatalogProductDetailGetVendorAttributeType) (ret CatalogProductDetailGetVendorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetVendorAttributeType(arg *CatalogProductDetailGetVendorAttributeType, val CatalogProductDetailGetVendorRetType) { + *arg = &val +} + +/* + types and functions for vendorTerms +*/ + +// isArray +type CatalogProductDetailGetVendorTermsAttributeType = *[]CatalogProductVendorTerms +type CatalogProductDetailGetVendorTermsArgType = []CatalogProductVendorTerms +type CatalogProductDetailGetVendorTermsRetType = []CatalogProductVendorTerms + +func getCatalogProductDetailGetVendorTermsAttributeTypeOk(arg CatalogProductDetailGetVendorTermsAttributeType) (ret CatalogProductDetailGetVendorTermsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetVendorTermsAttributeType(arg *CatalogProductDetailGetVendorTermsAttributeType, val CatalogProductDetailGetVendorTermsRetType) { + *arg = &val +} + +/* + types and functions for videoUrl +*/ + +// isNotNullableString +type CatalogProductDetailGetVideoUrlAttributeType = *string + +func getCatalogProductDetailGetVideoUrlAttributeTypeOk(arg CatalogProductDetailGetVideoUrlAttributeType) (ret CatalogProductDetailGetVideoUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetVideoUrlAttributeType(arg *CatalogProductDetailGetVideoUrlAttributeType, val CatalogProductDetailGetVideoUrlRetType) { + *arg = &val +} + +type CatalogProductDetailGetVideoUrlArgType = string +type CatalogProductDetailGetVideoUrlRetType = string + // CatalogProductDetail struct for CatalogProductDetail type CatalogProductDetail struct { // The list of categories associated to the product. - Categories *[]string `json:"categories,omitempty"` + Categories CatalogProductDetailGetCategoriesAttributeType `json:"categories,omitempty"` // The product type. For reference: SAAS - Software as a Service, SAI - STACKIT Application Image // REQUIRED - DeliveryMethod *string `json:"deliveryMethod"` + DeliveryMethod CatalogProductDetailGetDeliveryMethodAttributeType `json:"deliveryMethod"` // The product description. // REQUIRED - Description *string `json:"description"` + Description CatalogProductDetailGetDescriptionAttributeType `json:"description"` // The documentation URL. // REQUIRED - DocumentationUrl *string `json:"documentationUrl"` + DocumentationUrl CatalogProductDetailGetDocumentationUrlAttributeType `json:"documentationUrl"` // The list of highlights. // REQUIRED - Highlights *[]CatalogProductHighlight `json:"highlights"` + Highlights CatalogProductDetailGetHighlightsAttributeType `json:"highlights"` // If true, the product is not fully integrated but only listed. Product listings may not have prices and support information. // REQUIRED - IsProductListing *bool `json:"isProductListing"` + IsProductListing CatalogProductDetailgetIsProductListingAttributeType `json:"isProductListing"` // The lifecycle state of the product. // REQUIRED - LifecycleState *string `json:"lifecycleState"` + LifecycleState CatalogProductDetailGetLifecycleStateAttributeType `json:"lifecycleState"` // The logo base64 encoded. // REQUIRED - Logo *string `json:"logo"` + Logo CatalogProductDetailGetLogoAttributeType `json:"logo"` // The product name. // REQUIRED - Name *string `json:"name"` + Name CatalogProductDetailGetNameAttributeType `json:"name"` // The list of pricing options. // REQUIRED - PricingOptions *[]CatalogProductPricingOption `json:"pricingOptions"` + PricingOptions CatalogProductDetailGetPricingOptionsAttributeType `json:"pricingOptions"` // The product ID. // REQUIRED - ProductId *string `json:"productId"` + ProductId CatalogProductDetailGetProductIdAttributeType `json:"productId"` // The short summary of the product. // REQUIRED - Summary *string `json:"summary"` + Summary CatalogProductDetailGetSummaryAttributeType `json:"summary"` // The e-mail address for support inquiries. - SupportEmail *string `json:"supportEmail,omitempty"` + SupportEmail CatalogProductDetailGetSupportEmailAttributeType `json:"supportEmail,omitempty"` // The support FAQ URL. - SupportFaq *string `json:"supportFaq,omitempty"` + SupportFaq CatalogProductDetailGetSupportFaqAttributeType `json:"supportFaq,omitempty"` // The phone number for support inquiries. - SupportPhone *string `json:"supportPhone,omitempty"` + SupportPhone CatalogProductDetailGetSupportPhoneAttributeType `json:"supportPhone,omitempty"` // The list of support resources. - SupportResources *[]CatalogProductSupportResource `json:"supportResources,omitempty"` + SupportResources CatalogProductDetailGetSupportResourcesAttributeType `json:"supportResources,omitempty"` // REQUIRED - Vendor *CatalogProductDetailsVendor `json:"vendor"` + Vendor CatalogProductDetailGetVendorAttributeType `json:"vendor"` // The list of terms of use. - VendorTerms *[]CatalogProductVendorTerms `json:"vendorTerms,omitempty"` + VendorTerms CatalogProductDetailGetVendorTermsAttributeType `json:"vendorTerms,omitempty"` // The video URL. // REQUIRED - VideoUrl *string `json:"videoUrl"` + VideoUrl CatalogProductDetailGetVideoUrlAttributeType `json:"videoUrl"` } type _CatalogProductDetail CatalogProductDetail @@ -77,21 +467,21 @@ type _CatalogProductDetail CatalogProductDetail // 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 NewCatalogProductDetail(deliveryMethod *string, description *string, documentationUrl *string, highlights *[]CatalogProductHighlight, isProductListing *bool, lifecycleState *string, logo *string, name *string, pricingOptions *[]CatalogProductPricingOption, productId *string, summary *string, vendor *CatalogProductDetailsVendor, videoUrl *string) *CatalogProductDetail { +func NewCatalogProductDetail(deliveryMethod CatalogProductDetailGetDeliveryMethodArgType, description CatalogProductDetailGetDescriptionArgType, documentationUrl CatalogProductDetailGetDocumentationUrlArgType, highlights CatalogProductDetailGetHighlightsArgType, isProductListing CatalogProductDetailgetIsProductListingArgType, lifecycleState CatalogProductDetailGetLifecycleStateArgType, logo CatalogProductDetailGetLogoArgType, name CatalogProductDetailGetNameArgType, pricingOptions CatalogProductDetailGetPricingOptionsArgType, productId CatalogProductDetailGetProductIdArgType, summary CatalogProductDetailGetSummaryArgType, vendor CatalogProductDetailGetVendorArgType, videoUrl CatalogProductDetailGetVideoUrlArgType) *CatalogProductDetail { this := CatalogProductDetail{} - this.DeliveryMethod = deliveryMethod - this.Description = description - this.DocumentationUrl = documentationUrl - this.Highlights = highlights - this.IsProductListing = isProductListing - this.LifecycleState = lifecycleState - this.Logo = logo - this.Name = name - this.PricingOptions = pricingOptions - this.ProductId = productId - this.Summary = summary - this.Vendor = vendor - this.VideoUrl = videoUrl + setCatalogProductDetailGetDeliveryMethodAttributeType(&this.DeliveryMethod, deliveryMethod) + setCatalogProductDetailGetDescriptionAttributeType(&this.Description, description) + setCatalogProductDetailGetDocumentationUrlAttributeType(&this.DocumentationUrl, documentationUrl) + setCatalogProductDetailGetHighlightsAttributeType(&this.Highlights, highlights) + setCatalogProductDetailgetIsProductListingAttributeType(&this.IsProductListing, isProductListing) + setCatalogProductDetailGetLifecycleStateAttributeType(&this.LifecycleState, lifecycleState) + setCatalogProductDetailGetLogoAttributeType(&this.Logo, logo) + setCatalogProductDetailGetNameAttributeType(&this.Name, name) + setCatalogProductDetailGetPricingOptionsAttributeType(&this.PricingOptions, pricingOptions) + setCatalogProductDetailGetProductIdAttributeType(&this.ProductId, productId) + setCatalogProductDetailGetSummaryAttributeType(&this.Summary, summary) + setCatalogProductDetailGetVendorAttributeType(&this.Vendor, vendor) + setCatalogProductDetailGetVideoUrlAttributeType(&this.VideoUrl, videoUrl) return &this } @@ -104,542 +494,423 @@ func NewCatalogProductDetailWithDefaults() *CatalogProductDetail { } // GetCategories returns the Categories field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetCategories() *[]string { - if o == nil || IsNil(o.Categories) { - var ret *[]string - return ret - } - return o.Categories +func (o *CatalogProductDetail) GetCategories() (res CatalogProductDetailGetCategoriesRetType) { + res, _ = o.GetCategoriesOk() + return } // GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetCategoriesOk() (*[]string, bool) { - if o == nil || IsNil(o.Categories) { - return nil, false - } - return o.Categories, true +func (o *CatalogProductDetail) GetCategoriesOk() (ret CatalogProductDetailGetCategoriesRetType, ok bool) { + return getCatalogProductDetailGetCategoriesAttributeTypeOk(o.Categories) } // HasCategories returns a boolean if a field has been set. func (o *CatalogProductDetail) HasCategories() bool { - if o != nil && !IsNil(o.Categories) { - return true - } - - return false + _, ok := o.GetCategoriesOk() + return ok } // SetCategories gets a reference to the given []string and assigns it to the Categories field. -func (o *CatalogProductDetail) SetCategories(v *[]string) { - o.Categories = v +func (o *CatalogProductDetail) SetCategories(v CatalogProductDetailGetCategoriesRetType) { + setCatalogProductDetailGetCategoriesAttributeType(&o.Categories, v) } // GetDeliveryMethod returns the DeliveryMethod field value -func (o *CatalogProductDetail) GetDeliveryMethod() *string { - if o == nil || IsNil(o.DeliveryMethod) { - var ret *string - return ret - } - - return o.DeliveryMethod +func (o *CatalogProductDetail) GetDeliveryMethod() (ret CatalogProductDetailGetDeliveryMethodRetType) { + ret, _ = o.GetDeliveryMethodOk() + return ret } // GetDeliveryMethodOk returns a tuple with the DeliveryMethod field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetDeliveryMethodOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DeliveryMethod, true +func (o *CatalogProductDetail) GetDeliveryMethodOk() (ret CatalogProductDetailGetDeliveryMethodRetType, ok bool) { + return getCatalogProductDetailGetDeliveryMethodAttributeTypeOk(o.DeliveryMethod) } // SetDeliveryMethod sets field value -func (o *CatalogProductDetail) SetDeliveryMethod(v *string) { - o.DeliveryMethod = v +func (o *CatalogProductDetail) SetDeliveryMethod(v CatalogProductDetailGetDeliveryMethodRetType) { + setCatalogProductDetailGetDeliveryMethodAttributeType(&o.DeliveryMethod, v) } // GetDescription returns the Description field value -func (o *CatalogProductDetail) GetDescription() *string { - if o == nil || IsNil(o.Description) { - var ret *string - return ret - } - - return o.Description +func (o *CatalogProductDetail) GetDescription() (ret CatalogProductDetailGetDescriptionRetType) { + ret, _ = o.GetDescriptionOk() + return ret } // GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Description, true +func (o *CatalogProductDetail) GetDescriptionOk() (ret CatalogProductDetailGetDescriptionRetType, ok bool) { + return getCatalogProductDetailGetDescriptionAttributeTypeOk(o.Description) } // SetDescription sets field value -func (o *CatalogProductDetail) SetDescription(v *string) { - o.Description = v +func (o *CatalogProductDetail) SetDescription(v CatalogProductDetailGetDescriptionRetType) { + setCatalogProductDetailGetDescriptionAttributeType(&o.Description, v) } // GetDocumentationUrl returns the DocumentationUrl field value -func (o *CatalogProductDetail) GetDocumentationUrl() *string { - if o == nil || IsNil(o.DocumentationUrl) { - var ret *string - return ret - } - - return o.DocumentationUrl +func (o *CatalogProductDetail) GetDocumentationUrl() (ret CatalogProductDetailGetDocumentationUrlRetType) { + ret, _ = o.GetDocumentationUrlOk() + return ret } // GetDocumentationUrlOk returns a tuple with the DocumentationUrl field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetDocumentationUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DocumentationUrl, true +func (o *CatalogProductDetail) GetDocumentationUrlOk() (ret CatalogProductDetailGetDocumentationUrlRetType, ok bool) { + return getCatalogProductDetailGetDocumentationUrlAttributeTypeOk(o.DocumentationUrl) } // SetDocumentationUrl sets field value -func (o *CatalogProductDetail) SetDocumentationUrl(v *string) { - o.DocumentationUrl = v +func (o *CatalogProductDetail) SetDocumentationUrl(v CatalogProductDetailGetDocumentationUrlRetType) { + setCatalogProductDetailGetDocumentationUrlAttributeType(&o.DocumentationUrl, v) } // GetHighlights returns the Highlights field value -func (o *CatalogProductDetail) GetHighlights() *[]CatalogProductHighlight { - if o == nil || IsNil(o.Highlights) { - var ret *[]CatalogProductHighlight - return ret - } - - return o.Highlights +func (o *CatalogProductDetail) GetHighlights() (ret CatalogProductDetailGetHighlightsRetType) { + ret, _ = o.GetHighlightsOk() + return ret } // GetHighlightsOk returns a tuple with the Highlights field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetHighlightsOk() (*[]CatalogProductHighlight, bool) { - if o == nil { - return nil, false - } - return o.Highlights, true +func (o *CatalogProductDetail) GetHighlightsOk() (ret CatalogProductDetailGetHighlightsRetType, ok bool) { + return getCatalogProductDetailGetHighlightsAttributeTypeOk(o.Highlights) } // SetHighlights sets field value -func (o *CatalogProductDetail) SetHighlights(v *[]CatalogProductHighlight) { - o.Highlights = v +func (o *CatalogProductDetail) SetHighlights(v CatalogProductDetailGetHighlightsRetType) { + setCatalogProductDetailGetHighlightsAttributeType(&o.Highlights, v) } // GetIsProductListing returns the IsProductListing field value -func (o *CatalogProductDetail) GetIsProductListing() *bool { - if o == nil || IsNil(o.IsProductListing) { - var ret *bool - return ret - } - - return o.IsProductListing +func (o *CatalogProductDetail) GetIsProductListing() (ret CatalogProductDetailgetIsProductListingRetType) { + ret, _ = o.GetIsProductListingOk() + return ret } // GetIsProductListingOk returns a tuple with the IsProductListing field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetIsProductListingOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.IsProductListing, true +func (o *CatalogProductDetail) GetIsProductListingOk() (ret CatalogProductDetailgetIsProductListingRetType, ok bool) { + return getCatalogProductDetailgetIsProductListingAttributeTypeOk(o.IsProductListing) } // SetIsProductListing sets field value -func (o *CatalogProductDetail) SetIsProductListing(v *bool) { - o.IsProductListing = v +func (o *CatalogProductDetail) SetIsProductListing(v CatalogProductDetailgetIsProductListingRetType) { + setCatalogProductDetailgetIsProductListingAttributeType(&o.IsProductListing, v) } // GetLifecycleState returns the LifecycleState field value -func (o *CatalogProductDetail) GetLifecycleState() *string { - if o == nil || IsNil(o.LifecycleState) { - var ret *string - return ret - } - - return o.LifecycleState +func (o *CatalogProductDetail) GetLifecycleState() (ret CatalogProductDetailGetLifecycleStateRetType) { + ret, _ = o.GetLifecycleStateOk() + return ret } // GetLifecycleStateOk returns a tuple with the LifecycleState field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetLifecycleStateOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.LifecycleState, true +func (o *CatalogProductDetail) GetLifecycleStateOk() (ret CatalogProductDetailGetLifecycleStateRetType, ok bool) { + return getCatalogProductDetailGetLifecycleStateAttributeTypeOk(o.LifecycleState) } // SetLifecycleState sets field value -func (o *CatalogProductDetail) SetLifecycleState(v *string) { - o.LifecycleState = v +func (o *CatalogProductDetail) SetLifecycleState(v CatalogProductDetailGetLifecycleStateRetType) { + setCatalogProductDetailGetLifecycleStateAttributeType(&o.LifecycleState, v) } // GetLogo returns the Logo field value -func (o *CatalogProductDetail) GetLogo() *string { - if o == nil || IsNil(o.Logo) { - var ret *string - return ret - } - - return o.Logo +func (o *CatalogProductDetail) GetLogo() (ret CatalogProductDetailGetLogoRetType) { + ret, _ = o.GetLogoOk() + return ret } // GetLogoOk returns a tuple with the Logo field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetLogoOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Logo, true +func (o *CatalogProductDetail) GetLogoOk() (ret CatalogProductDetailGetLogoRetType, ok bool) { + return getCatalogProductDetailGetLogoAttributeTypeOk(o.Logo) } // SetLogo sets field value -func (o *CatalogProductDetail) SetLogo(v *string) { - o.Logo = v +func (o *CatalogProductDetail) SetLogo(v CatalogProductDetailGetLogoRetType) { + setCatalogProductDetailGetLogoAttributeType(&o.Logo, v) } // GetName returns the Name field value -func (o *CatalogProductDetail) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *CatalogProductDetail) GetName() (ret CatalogProductDetailGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true +func (o *CatalogProductDetail) GetNameOk() (ret CatalogProductDetailGetNameRetType, ok bool) { + return getCatalogProductDetailGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *CatalogProductDetail) SetName(v *string) { - o.Name = v +func (o *CatalogProductDetail) SetName(v CatalogProductDetailGetNameRetType) { + setCatalogProductDetailGetNameAttributeType(&o.Name, v) } // GetPricingOptions returns the PricingOptions field value -func (o *CatalogProductDetail) GetPricingOptions() *[]CatalogProductPricingOption { - if o == nil || IsNil(o.PricingOptions) { - var ret *[]CatalogProductPricingOption - return ret - } - - return o.PricingOptions +func (o *CatalogProductDetail) GetPricingOptions() (ret CatalogProductDetailGetPricingOptionsRetType) { + ret, _ = o.GetPricingOptionsOk() + return ret } // GetPricingOptionsOk returns a tuple with the PricingOptions field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetPricingOptionsOk() (*[]CatalogProductPricingOption, bool) { - if o == nil { - return nil, false - } - return o.PricingOptions, true +func (o *CatalogProductDetail) GetPricingOptionsOk() (ret CatalogProductDetailGetPricingOptionsRetType, ok bool) { + return getCatalogProductDetailGetPricingOptionsAttributeTypeOk(o.PricingOptions) } // SetPricingOptions sets field value -func (o *CatalogProductDetail) SetPricingOptions(v *[]CatalogProductPricingOption) { - o.PricingOptions = v +func (o *CatalogProductDetail) SetPricingOptions(v CatalogProductDetailGetPricingOptionsRetType) { + setCatalogProductDetailGetPricingOptionsAttributeType(&o.PricingOptions, v) } // GetProductId returns the ProductId field value -func (o *CatalogProductDetail) GetProductId() *string { - if o == nil || IsNil(o.ProductId) { - var ret *string - return ret - } - - return o.ProductId +func (o *CatalogProductDetail) GetProductId() (ret CatalogProductDetailGetProductIdRetType) { + 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 *CatalogProductDetail) GetProductIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ProductId, true +func (o *CatalogProductDetail) GetProductIdOk() (ret CatalogProductDetailGetProductIdRetType, ok bool) { + return getCatalogProductDetailGetProductIdAttributeTypeOk(o.ProductId) } // SetProductId sets field value -func (o *CatalogProductDetail) SetProductId(v *string) { - o.ProductId = v +func (o *CatalogProductDetail) SetProductId(v CatalogProductDetailGetProductIdRetType) { + setCatalogProductDetailGetProductIdAttributeType(&o.ProductId, v) } // GetSummary returns the Summary field value -func (o *CatalogProductDetail) GetSummary() *string { - if o == nil || IsNil(o.Summary) { - var ret *string - return ret - } - - return o.Summary +func (o *CatalogProductDetail) GetSummary() (ret CatalogProductDetailGetSummaryRetType) { + ret, _ = o.GetSummaryOk() + return ret } // GetSummaryOk returns a tuple with the Summary field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetSummaryOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Summary, true +func (o *CatalogProductDetail) GetSummaryOk() (ret CatalogProductDetailGetSummaryRetType, ok bool) { + return getCatalogProductDetailGetSummaryAttributeTypeOk(o.Summary) } // SetSummary sets field value -func (o *CatalogProductDetail) SetSummary(v *string) { - o.Summary = v +func (o *CatalogProductDetail) SetSummary(v CatalogProductDetailGetSummaryRetType) { + setCatalogProductDetailGetSummaryAttributeType(&o.Summary, v) } // GetSupportEmail returns the SupportEmail field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetSupportEmail() *string { - if o == nil || IsNil(o.SupportEmail) { - var ret *string - return ret - } - return o.SupportEmail +func (o *CatalogProductDetail) GetSupportEmail() (res CatalogProductDetailGetSupportEmailRetType) { + res, _ = o.GetSupportEmailOk() + return } // GetSupportEmailOk returns a tuple with the SupportEmail field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetSupportEmailOk() (*string, bool) { - if o == nil || IsNil(o.SupportEmail) { - return nil, false - } - return o.SupportEmail, true +func (o *CatalogProductDetail) GetSupportEmailOk() (ret CatalogProductDetailGetSupportEmailRetType, ok bool) { + return getCatalogProductDetailGetSupportEmailAttributeTypeOk(o.SupportEmail) } // HasSupportEmail returns a boolean if a field has been set. func (o *CatalogProductDetail) HasSupportEmail() bool { - if o != nil && !IsNil(o.SupportEmail) { - return true - } - - return false + _, ok := o.GetSupportEmailOk() + return ok } // SetSupportEmail gets a reference to the given string and assigns it to the SupportEmail field. -func (o *CatalogProductDetail) SetSupportEmail(v *string) { - o.SupportEmail = v +func (o *CatalogProductDetail) SetSupportEmail(v CatalogProductDetailGetSupportEmailRetType) { + setCatalogProductDetailGetSupportEmailAttributeType(&o.SupportEmail, v) } // GetSupportFaq returns the SupportFaq field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetSupportFaq() *string { - if o == nil || IsNil(o.SupportFaq) { - var ret *string - return ret - } - return o.SupportFaq +func (o *CatalogProductDetail) GetSupportFaq() (res CatalogProductDetailGetSupportFaqRetType) { + res, _ = o.GetSupportFaqOk() + return } // GetSupportFaqOk returns a tuple with the SupportFaq field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetSupportFaqOk() (*string, bool) { - if o == nil || IsNil(o.SupportFaq) { - return nil, false - } - return o.SupportFaq, true +func (o *CatalogProductDetail) GetSupportFaqOk() (ret CatalogProductDetailGetSupportFaqRetType, ok bool) { + return getCatalogProductDetailGetSupportFaqAttributeTypeOk(o.SupportFaq) } // HasSupportFaq returns a boolean if a field has been set. func (o *CatalogProductDetail) HasSupportFaq() bool { - if o != nil && !IsNil(o.SupportFaq) { - return true - } - - return false + _, ok := o.GetSupportFaqOk() + return ok } // SetSupportFaq gets a reference to the given string and assigns it to the SupportFaq field. -func (o *CatalogProductDetail) SetSupportFaq(v *string) { - o.SupportFaq = v +func (o *CatalogProductDetail) SetSupportFaq(v CatalogProductDetailGetSupportFaqRetType) { + setCatalogProductDetailGetSupportFaqAttributeType(&o.SupportFaq, v) } // GetSupportPhone returns the SupportPhone field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetSupportPhone() *string { - if o == nil || IsNil(o.SupportPhone) { - var ret *string - return ret - } - return o.SupportPhone +func (o *CatalogProductDetail) GetSupportPhone() (res CatalogProductDetailGetSupportPhoneRetType) { + res, _ = o.GetSupportPhoneOk() + return } // GetSupportPhoneOk returns a tuple with the SupportPhone field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetSupportPhoneOk() (*string, bool) { - if o == nil || IsNil(o.SupportPhone) { - return nil, false - } - return o.SupportPhone, true +func (o *CatalogProductDetail) GetSupportPhoneOk() (ret CatalogProductDetailGetSupportPhoneRetType, ok bool) { + return getCatalogProductDetailGetSupportPhoneAttributeTypeOk(o.SupportPhone) } // HasSupportPhone returns a boolean if a field has been set. func (o *CatalogProductDetail) HasSupportPhone() bool { - if o != nil && !IsNil(o.SupportPhone) { - return true - } - - return false + _, ok := o.GetSupportPhoneOk() + return ok } // SetSupportPhone gets a reference to the given string and assigns it to the SupportPhone field. -func (o *CatalogProductDetail) SetSupportPhone(v *string) { - o.SupportPhone = v +func (o *CatalogProductDetail) SetSupportPhone(v CatalogProductDetailGetSupportPhoneRetType) { + setCatalogProductDetailGetSupportPhoneAttributeType(&o.SupportPhone, v) } // GetSupportResources returns the SupportResources field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetSupportResources() *[]CatalogProductSupportResource { - if o == nil || IsNil(o.SupportResources) { - var ret *[]CatalogProductSupportResource - return ret - } - return o.SupportResources +func (o *CatalogProductDetail) GetSupportResources() (res CatalogProductDetailGetSupportResourcesRetType) { + res, _ = o.GetSupportResourcesOk() + return } // GetSupportResourcesOk returns a tuple with the SupportResources field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetSupportResourcesOk() (*[]CatalogProductSupportResource, bool) { - if o == nil || IsNil(o.SupportResources) { - return nil, false - } - return o.SupportResources, true +func (o *CatalogProductDetail) GetSupportResourcesOk() (ret CatalogProductDetailGetSupportResourcesRetType, ok bool) { + return getCatalogProductDetailGetSupportResourcesAttributeTypeOk(o.SupportResources) } // HasSupportResources returns a boolean if a field has been set. func (o *CatalogProductDetail) HasSupportResources() bool { - if o != nil && !IsNil(o.SupportResources) { - return true - } - - return false + _, ok := o.GetSupportResourcesOk() + return ok } // SetSupportResources gets a reference to the given []CatalogProductSupportResource and assigns it to the SupportResources field. -func (o *CatalogProductDetail) SetSupportResources(v *[]CatalogProductSupportResource) { - o.SupportResources = v +func (o *CatalogProductDetail) SetSupportResources(v CatalogProductDetailGetSupportResourcesRetType) { + setCatalogProductDetailGetSupportResourcesAttributeType(&o.SupportResources, v) } // GetVendor returns the Vendor field value -func (o *CatalogProductDetail) GetVendor() *CatalogProductDetailsVendor { - if o == nil || IsNil(o.Vendor) { - var ret *CatalogProductDetailsVendor - return ret - } - - return o.Vendor +func (o *CatalogProductDetail) GetVendor() (ret CatalogProductDetailGetVendorRetType) { + ret, _ = o.GetVendorOk() + return ret } // GetVendorOk returns a tuple with the Vendor field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetVendorOk() (*CatalogProductDetailsVendor, bool) { - if o == nil { - return nil, false - } - return o.Vendor, true +func (o *CatalogProductDetail) GetVendorOk() (ret CatalogProductDetailGetVendorRetType, ok bool) { + return getCatalogProductDetailGetVendorAttributeTypeOk(o.Vendor) } // SetVendor sets field value -func (o *CatalogProductDetail) SetVendor(v *CatalogProductDetailsVendor) { - o.Vendor = v +func (o *CatalogProductDetail) SetVendor(v CatalogProductDetailGetVendorRetType) { + setCatalogProductDetailGetVendorAttributeType(&o.Vendor, v) } // GetVendorTerms returns the VendorTerms field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetVendorTerms() *[]CatalogProductVendorTerms { - if o == nil || IsNil(o.VendorTerms) { - var ret *[]CatalogProductVendorTerms - return ret - } - return o.VendorTerms +func (o *CatalogProductDetail) GetVendorTerms() (res CatalogProductDetailGetVendorTermsRetType) { + res, _ = o.GetVendorTermsOk() + return } // GetVendorTermsOk returns a tuple with the VendorTerms field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetVendorTermsOk() (*[]CatalogProductVendorTerms, bool) { - if o == nil || IsNil(o.VendorTerms) { - return nil, false - } - return o.VendorTerms, true +func (o *CatalogProductDetail) GetVendorTermsOk() (ret CatalogProductDetailGetVendorTermsRetType, ok bool) { + return getCatalogProductDetailGetVendorTermsAttributeTypeOk(o.VendorTerms) } // HasVendorTerms returns a boolean if a field has been set. func (o *CatalogProductDetail) HasVendorTerms() bool { - if o != nil && !IsNil(o.VendorTerms) { - return true - } - - return false + _, ok := o.GetVendorTermsOk() + return ok } // SetVendorTerms gets a reference to the given []CatalogProductVendorTerms and assigns it to the VendorTerms field. -func (o *CatalogProductDetail) SetVendorTerms(v *[]CatalogProductVendorTerms) { - o.VendorTerms = v +func (o *CatalogProductDetail) SetVendorTerms(v CatalogProductDetailGetVendorTermsRetType) { + setCatalogProductDetailGetVendorTermsAttributeType(&o.VendorTerms, v) } // GetVideoUrl returns the VideoUrl field value -func (o *CatalogProductDetail) GetVideoUrl() *string { - if o == nil || IsNil(o.VideoUrl) { - var ret *string - return ret - } - - return o.VideoUrl +func (o *CatalogProductDetail) GetVideoUrl() (ret CatalogProductDetailGetVideoUrlRetType) { + ret, _ = o.GetVideoUrlOk() + return ret } // GetVideoUrlOk returns a tuple with the VideoUrl field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetVideoUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.VideoUrl, true +func (o *CatalogProductDetail) GetVideoUrlOk() (ret CatalogProductDetailGetVideoUrlRetType, ok bool) { + return getCatalogProductDetailGetVideoUrlAttributeTypeOk(o.VideoUrl) } // SetVideoUrl sets field value -func (o *CatalogProductDetail) SetVideoUrl(v *string) { - o.VideoUrl = v +func (o *CatalogProductDetail) SetVideoUrl(v CatalogProductDetailGetVideoUrlRetType) { + setCatalogProductDetailGetVideoUrlAttributeType(&o.VideoUrl, v) } func (o CatalogProductDetail) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Categories) { - toSerialize["categories"] = o.Categories - } - toSerialize["deliveryMethod"] = o.DeliveryMethod - toSerialize["description"] = o.Description - toSerialize["documentationUrl"] = o.DocumentationUrl - toSerialize["highlights"] = o.Highlights - toSerialize["isProductListing"] = o.IsProductListing - toSerialize["lifecycleState"] = o.LifecycleState - toSerialize["logo"] = o.Logo - toSerialize["name"] = o.Name - toSerialize["pricingOptions"] = o.PricingOptions - toSerialize["productId"] = o.ProductId - toSerialize["summary"] = o.Summary - if !IsNil(o.SupportEmail) { - toSerialize["supportEmail"] = o.SupportEmail - } - if !IsNil(o.SupportFaq) { - toSerialize["supportFaq"] = o.SupportFaq - } - if !IsNil(o.SupportPhone) { - toSerialize["supportPhone"] = o.SupportPhone - } - if !IsNil(o.SupportResources) { - toSerialize["supportResources"] = o.SupportResources - } - toSerialize["vendor"] = o.Vendor - if !IsNil(o.VendorTerms) { - toSerialize["vendorTerms"] = o.VendorTerms - } - toSerialize["videoUrl"] = o.VideoUrl + if val, ok := getCatalogProductDetailGetCategoriesAttributeTypeOk(o.Categories); ok { + toSerialize["Categories"] = val + } + if val, ok := getCatalogProductDetailGetDeliveryMethodAttributeTypeOk(o.DeliveryMethod); ok { + toSerialize["DeliveryMethod"] = val + } + if val, ok := getCatalogProductDetailGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getCatalogProductDetailGetDocumentationUrlAttributeTypeOk(o.DocumentationUrl); ok { + toSerialize["DocumentationUrl"] = val + } + if val, ok := getCatalogProductDetailGetHighlightsAttributeTypeOk(o.Highlights); ok { + toSerialize["Highlights"] = val + } + if val, ok := getCatalogProductDetailgetIsProductListingAttributeTypeOk(o.IsProductListing); ok { + toSerialize["IsProductListing"] = val + } + if val, ok := getCatalogProductDetailGetLifecycleStateAttributeTypeOk(o.LifecycleState); ok { + toSerialize["LifecycleState"] = val + } + if val, ok := getCatalogProductDetailGetLogoAttributeTypeOk(o.Logo); ok { + toSerialize["Logo"] = val + } + if val, ok := getCatalogProductDetailGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getCatalogProductDetailGetPricingOptionsAttributeTypeOk(o.PricingOptions); ok { + toSerialize["PricingOptions"] = val + } + if val, ok := getCatalogProductDetailGetProductIdAttributeTypeOk(o.ProductId); ok { + toSerialize["ProductId"] = val + } + if val, ok := getCatalogProductDetailGetSummaryAttributeTypeOk(o.Summary); ok { + toSerialize["Summary"] = val + } + if val, ok := getCatalogProductDetailGetSupportEmailAttributeTypeOk(o.SupportEmail); ok { + toSerialize["SupportEmail"] = val + } + if val, ok := getCatalogProductDetailGetSupportFaqAttributeTypeOk(o.SupportFaq); ok { + toSerialize["SupportFaq"] = val + } + if val, ok := getCatalogProductDetailGetSupportPhoneAttributeTypeOk(o.SupportPhone); ok { + toSerialize["SupportPhone"] = val + } + if val, ok := getCatalogProductDetailGetSupportResourcesAttributeTypeOk(o.SupportResources); ok { + toSerialize["SupportResources"] = val + } + if val, ok := getCatalogProductDetailGetVendorAttributeTypeOk(o.Vendor); ok { + toSerialize["Vendor"] = val + } + if val, ok := getCatalogProductDetailGetVendorTermsAttributeTypeOk(o.VendorTerms); ok { + toSerialize["VendorTerms"] = val + } + if val, ok := getCatalogProductDetailGetVideoUrlAttributeTypeOk(o.VideoUrl); ok { + toSerialize["VideoUrl"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_catalog_product_details_vendor.go b/services/stackitmarketplace/model_catalog_product_details_vendor.go index 36ea655f0..6f847e930 100644 --- a/services/stackitmarketplace/model_catalog_product_details_vendor.go +++ b/services/stackitmarketplace/model_catalog_product_details_vendor.go @@ -17,26 +17,152 @@ import ( // checks if the CatalogProductDetailsVendor type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CatalogProductDetailsVendor{} +/* + types and functions for description +*/ + +// isNotNullableString +type CatalogProductDetailsVendorGetDescriptionAttributeType = *string + +func getCatalogProductDetailsVendorGetDescriptionAttributeTypeOk(arg CatalogProductDetailsVendorGetDescriptionAttributeType) (ret CatalogProductDetailsVendorGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailsVendorGetDescriptionAttributeType(arg *CatalogProductDetailsVendorGetDescriptionAttributeType, val CatalogProductDetailsVendorGetDescriptionRetType) { + *arg = &val +} + +type CatalogProductDetailsVendorGetDescriptionArgType = string +type CatalogProductDetailsVendorGetDescriptionRetType = string + +/* + types and functions for logo +*/ + +// isNotNullableString +type CatalogProductDetailsVendorGetLogoAttributeType = *string + +func getCatalogProductDetailsVendorGetLogoAttributeTypeOk(arg CatalogProductDetailsVendorGetLogoAttributeType) (ret CatalogProductDetailsVendorGetLogoRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailsVendorGetLogoAttributeType(arg *CatalogProductDetailsVendorGetLogoAttributeType, val CatalogProductDetailsVendorGetLogoRetType) { + *arg = &val +} + +type CatalogProductDetailsVendorGetLogoArgType = string +type CatalogProductDetailsVendorGetLogoRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type CatalogProductDetailsVendorGetNameAttributeType = *string + +func getCatalogProductDetailsVendorGetNameAttributeTypeOk(arg CatalogProductDetailsVendorGetNameAttributeType) (ret CatalogProductDetailsVendorGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailsVendorGetNameAttributeType(arg *CatalogProductDetailsVendorGetNameAttributeType, val CatalogProductDetailsVendorGetNameRetType) { + *arg = &val +} + +type CatalogProductDetailsVendorGetNameArgType = string +type CatalogProductDetailsVendorGetNameRetType = string + +/* + types and functions for vendorId +*/ + +// isNotNullableString +type CatalogProductDetailsVendorGetVendorIdAttributeType = *string + +func getCatalogProductDetailsVendorGetVendorIdAttributeTypeOk(arg CatalogProductDetailsVendorGetVendorIdAttributeType) (ret CatalogProductDetailsVendorGetVendorIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailsVendorGetVendorIdAttributeType(arg *CatalogProductDetailsVendorGetVendorIdAttributeType, val CatalogProductDetailsVendorGetVendorIdRetType) { + *arg = &val +} + +type CatalogProductDetailsVendorGetVendorIdArgType = string +type CatalogProductDetailsVendorGetVendorIdRetType = string + +/* + types and functions for videoUrl +*/ + +// isNotNullableString +type CatalogProductDetailsVendorGetVideoUrlAttributeType = *string + +func getCatalogProductDetailsVendorGetVideoUrlAttributeTypeOk(arg CatalogProductDetailsVendorGetVideoUrlAttributeType) (ret CatalogProductDetailsVendorGetVideoUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailsVendorGetVideoUrlAttributeType(arg *CatalogProductDetailsVendorGetVideoUrlAttributeType, val CatalogProductDetailsVendorGetVideoUrlRetType) { + *arg = &val +} + +type CatalogProductDetailsVendorGetVideoUrlArgType = string +type CatalogProductDetailsVendorGetVideoUrlRetType = string + +/* + types and functions for websiteUrl +*/ + +// isNotNullableString +type CatalogProductDetailsVendorGetWebsiteUrlAttributeType = *string + +func getCatalogProductDetailsVendorGetWebsiteUrlAttributeTypeOk(arg CatalogProductDetailsVendorGetWebsiteUrlAttributeType) (ret CatalogProductDetailsVendorGetWebsiteUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailsVendorGetWebsiteUrlAttributeType(arg *CatalogProductDetailsVendorGetWebsiteUrlAttributeType, val CatalogProductDetailsVendorGetWebsiteUrlRetType) { + *arg = &val +} + +type CatalogProductDetailsVendorGetWebsiteUrlArgType = string +type CatalogProductDetailsVendorGetWebsiteUrlRetType = string + // CatalogProductDetailsVendor struct for CatalogProductDetailsVendor type CatalogProductDetailsVendor struct { // The vendor description. // REQUIRED - Description *string `json:"description"` + Description CatalogProductDetailsVendorGetDescriptionAttributeType `json:"description"` // The vendor logo base64 encoded. // REQUIRED - Logo *string `json:"logo"` + Logo CatalogProductDetailsVendorGetLogoAttributeType `json:"logo"` // The vendor name. // REQUIRED - Name *string `json:"name"` + Name CatalogProductDetailsVendorGetNameAttributeType `json:"name"` // The vendor ID. // REQUIRED - VendorId *string `json:"vendorId"` + VendorId CatalogProductDetailsVendorGetVendorIdAttributeType `json:"vendorId"` // The vendor video URL. // REQUIRED - VideoUrl *string `json:"videoUrl"` + VideoUrl CatalogProductDetailsVendorGetVideoUrlAttributeType `json:"videoUrl"` // The vendor website URL. // REQUIRED - WebsiteUrl *string `json:"websiteUrl"` + WebsiteUrl CatalogProductDetailsVendorGetWebsiteUrlAttributeType `json:"websiteUrl"` } type _CatalogProductDetailsVendor CatalogProductDetailsVendor @@ -45,14 +171,14 @@ type _CatalogProductDetailsVendor CatalogProductDetailsVendor // 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 NewCatalogProductDetailsVendor(description *string, logo *string, name *string, vendorId *string, videoUrl *string, websiteUrl *string) *CatalogProductDetailsVendor { +func NewCatalogProductDetailsVendor(description CatalogProductDetailsVendorGetDescriptionArgType, logo CatalogProductDetailsVendorGetLogoArgType, name CatalogProductDetailsVendorGetNameArgType, vendorId CatalogProductDetailsVendorGetVendorIdArgType, videoUrl CatalogProductDetailsVendorGetVideoUrlArgType, websiteUrl CatalogProductDetailsVendorGetWebsiteUrlArgType) *CatalogProductDetailsVendor { this := CatalogProductDetailsVendor{} - this.Description = description - this.Logo = logo - this.Name = name - this.VendorId = vendorId - this.VideoUrl = videoUrl - this.WebsiteUrl = websiteUrl + setCatalogProductDetailsVendorGetDescriptionAttributeType(&this.Description, description) + setCatalogProductDetailsVendorGetLogoAttributeType(&this.Logo, logo) + setCatalogProductDetailsVendorGetNameAttributeType(&this.Name, name) + setCatalogProductDetailsVendorGetVendorIdAttributeType(&this.VendorId, vendorId) + setCatalogProductDetailsVendorGetVideoUrlAttributeType(&this.VideoUrl, videoUrl) + setCatalogProductDetailsVendorGetWebsiteUrlAttributeType(&this.WebsiteUrl, websiteUrl) return &this } @@ -65,157 +191,127 @@ func NewCatalogProductDetailsVendorWithDefaults() *CatalogProductDetailsVendor { } // GetDescription returns the Description field value -func (o *CatalogProductDetailsVendor) GetDescription() *string { - if o == nil || IsNil(o.Description) { - var ret *string - return ret - } - - return o.Description +func (o *CatalogProductDetailsVendor) GetDescription() (ret CatalogProductDetailsVendorGetDescriptionRetType) { + ret, _ = o.GetDescriptionOk() + return ret } // GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetailsVendor) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Description, true +func (o *CatalogProductDetailsVendor) GetDescriptionOk() (ret CatalogProductDetailsVendorGetDescriptionRetType, ok bool) { + return getCatalogProductDetailsVendorGetDescriptionAttributeTypeOk(o.Description) } // SetDescription sets field value -func (o *CatalogProductDetailsVendor) SetDescription(v *string) { - o.Description = v +func (o *CatalogProductDetailsVendor) SetDescription(v CatalogProductDetailsVendorGetDescriptionRetType) { + setCatalogProductDetailsVendorGetDescriptionAttributeType(&o.Description, v) } // GetLogo returns the Logo field value -func (o *CatalogProductDetailsVendor) GetLogo() *string { - if o == nil || IsNil(o.Logo) { - var ret *string - return ret - } - - return o.Logo +func (o *CatalogProductDetailsVendor) GetLogo() (ret CatalogProductDetailsVendorGetLogoRetType) { + ret, _ = o.GetLogoOk() + return ret } // GetLogoOk returns a tuple with the Logo field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetailsVendor) GetLogoOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Logo, true +func (o *CatalogProductDetailsVendor) GetLogoOk() (ret CatalogProductDetailsVendorGetLogoRetType, ok bool) { + return getCatalogProductDetailsVendorGetLogoAttributeTypeOk(o.Logo) } // SetLogo sets field value -func (o *CatalogProductDetailsVendor) SetLogo(v *string) { - o.Logo = v +func (o *CatalogProductDetailsVendor) SetLogo(v CatalogProductDetailsVendorGetLogoRetType) { + setCatalogProductDetailsVendorGetLogoAttributeType(&o.Logo, v) } // GetName returns the Name field value -func (o *CatalogProductDetailsVendor) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *CatalogProductDetailsVendor) GetName() (ret CatalogProductDetailsVendorGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetailsVendor) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true +func (o *CatalogProductDetailsVendor) GetNameOk() (ret CatalogProductDetailsVendorGetNameRetType, ok bool) { + return getCatalogProductDetailsVendorGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *CatalogProductDetailsVendor) SetName(v *string) { - o.Name = v +func (o *CatalogProductDetailsVendor) SetName(v CatalogProductDetailsVendorGetNameRetType) { + setCatalogProductDetailsVendorGetNameAttributeType(&o.Name, v) } // GetVendorId returns the VendorId field value -func (o *CatalogProductDetailsVendor) GetVendorId() *string { - if o == nil || IsNil(o.VendorId) { - var ret *string - return ret - } - - return o.VendorId +func (o *CatalogProductDetailsVendor) GetVendorId() (ret CatalogProductDetailsVendorGetVendorIdRetType) { + ret, _ = o.GetVendorIdOk() + return ret } // GetVendorIdOk returns a tuple with the VendorId field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetailsVendor) GetVendorIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.VendorId, true +func (o *CatalogProductDetailsVendor) GetVendorIdOk() (ret CatalogProductDetailsVendorGetVendorIdRetType, ok bool) { + return getCatalogProductDetailsVendorGetVendorIdAttributeTypeOk(o.VendorId) } // SetVendorId sets field value -func (o *CatalogProductDetailsVendor) SetVendorId(v *string) { - o.VendorId = v +func (o *CatalogProductDetailsVendor) SetVendorId(v CatalogProductDetailsVendorGetVendorIdRetType) { + setCatalogProductDetailsVendorGetVendorIdAttributeType(&o.VendorId, v) } // GetVideoUrl returns the VideoUrl field value -func (o *CatalogProductDetailsVendor) GetVideoUrl() *string { - if o == nil || IsNil(o.VideoUrl) { - var ret *string - return ret - } - - return o.VideoUrl +func (o *CatalogProductDetailsVendor) GetVideoUrl() (ret CatalogProductDetailsVendorGetVideoUrlRetType) { + ret, _ = o.GetVideoUrlOk() + return ret } // GetVideoUrlOk returns a tuple with the VideoUrl field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetailsVendor) GetVideoUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.VideoUrl, true +func (o *CatalogProductDetailsVendor) GetVideoUrlOk() (ret CatalogProductDetailsVendorGetVideoUrlRetType, ok bool) { + return getCatalogProductDetailsVendorGetVideoUrlAttributeTypeOk(o.VideoUrl) } // SetVideoUrl sets field value -func (o *CatalogProductDetailsVendor) SetVideoUrl(v *string) { - o.VideoUrl = v +func (o *CatalogProductDetailsVendor) SetVideoUrl(v CatalogProductDetailsVendorGetVideoUrlRetType) { + setCatalogProductDetailsVendorGetVideoUrlAttributeType(&o.VideoUrl, v) } // GetWebsiteUrl returns the WebsiteUrl field value -func (o *CatalogProductDetailsVendor) GetWebsiteUrl() *string { - if o == nil || IsNil(o.WebsiteUrl) { - var ret *string - return ret - } - - return o.WebsiteUrl +func (o *CatalogProductDetailsVendor) GetWebsiteUrl() (ret CatalogProductDetailsVendorGetWebsiteUrlRetType) { + ret, _ = o.GetWebsiteUrlOk() + return ret } // GetWebsiteUrlOk returns a tuple with the WebsiteUrl field value // and a boolean to check if the value has been set. -func (o *CatalogProductDetailsVendor) GetWebsiteUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.WebsiteUrl, true +func (o *CatalogProductDetailsVendor) GetWebsiteUrlOk() (ret CatalogProductDetailsVendorGetWebsiteUrlRetType, ok bool) { + return getCatalogProductDetailsVendorGetWebsiteUrlAttributeTypeOk(o.WebsiteUrl) } // SetWebsiteUrl sets field value -func (o *CatalogProductDetailsVendor) SetWebsiteUrl(v *string) { - o.WebsiteUrl = v +func (o *CatalogProductDetailsVendor) SetWebsiteUrl(v CatalogProductDetailsVendorGetWebsiteUrlRetType) { + setCatalogProductDetailsVendorGetWebsiteUrlAttributeType(&o.WebsiteUrl, v) } func (o CatalogProductDetailsVendor) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["description"] = o.Description - toSerialize["logo"] = o.Logo - toSerialize["name"] = o.Name - toSerialize["vendorId"] = o.VendorId - toSerialize["videoUrl"] = o.VideoUrl - toSerialize["websiteUrl"] = o.WebsiteUrl + if val, ok := getCatalogProductDetailsVendorGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getCatalogProductDetailsVendorGetLogoAttributeTypeOk(o.Logo); ok { + toSerialize["Logo"] = val + } + if val, ok := getCatalogProductDetailsVendorGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getCatalogProductDetailsVendorGetVendorIdAttributeTypeOk(o.VendorId); ok { + toSerialize["VendorId"] = val + } + if val, ok := getCatalogProductDetailsVendorGetVideoUrlAttributeTypeOk(o.VideoUrl); ok { + toSerialize["VideoUrl"] = val + } + if val, ok := getCatalogProductDetailsVendorGetWebsiteUrlAttributeTypeOk(o.WebsiteUrl); ok { + toSerialize["WebsiteUrl"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_catalog_product_highlight.go b/services/stackitmarketplace/model_catalog_product_highlight.go index 6ae27a777..0d4793640 100644 --- a/services/stackitmarketplace/model_catalog_product_highlight.go +++ b/services/stackitmarketplace/model_catalog_product_highlight.go @@ -17,14 +17,77 @@ import ( // checks if the CatalogProductHighlight type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CatalogProductHighlight{} +/* + types and functions for highlightContent +*/ + +// isNotNullableString +type CatalogProductHighlightGetHighlightContentAttributeType = *string + +func getCatalogProductHighlightGetHighlightContentAttributeTypeOk(arg CatalogProductHighlightGetHighlightContentAttributeType) (ret CatalogProductHighlightGetHighlightContentRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductHighlightGetHighlightContentAttributeType(arg *CatalogProductHighlightGetHighlightContentAttributeType, val CatalogProductHighlightGetHighlightContentRetType) { + *arg = &val +} + +type CatalogProductHighlightGetHighlightContentArgType = string +type CatalogProductHighlightGetHighlightContentRetType = string + +/* + types and functions for highlightIcon +*/ + +// isNotNullableString +type CatalogProductHighlightGetHighlightIconAttributeType = *string + +func getCatalogProductHighlightGetHighlightIconAttributeTypeOk(arg CatalogProductHighlightGetHighlightIconAttributeType) (ret CatalogProductHighlightGetHighlightIconRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductHighlightGetHighlightIconAttributeType(arg *CatalogProductHighlightGetHighlightIconAttributeType, val CatalogProductHighlightGetHighlightIconRetType) { + *arg = &val +} + +type CatalogProductHighlightGetHighlightIconArgType = string +type CatalogProductHighlightGetHighlightIconRetType = string + +/* + types and functions for highlightTitle +*/ + +// isNotNullableString +type CatalogProductHighlightGetHighlightTitleAttributeType = *string + +func getCatalogProductHighlightGetHighlightTitleAttributeTypeOk(arg CatalogProductHighlightGetHighlightTitleAttributeType) (ret CatalogProductHighlightGetHighlightTitleRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductHighlightGetHighlightTitleAttributeType(arg *CatalogProductHighlightGetHighlightTitleAttributeType, val CatalogProductHighlightGetHighlightTitleRetType) { + *arg = &val +} + +type CatalogProductHighlightGetHighlightTitleArgType = string +type CatalogProductHighlightGetHighlightTitleRetType = string + // CatalogProductHighlight struct for CatalogProductHighlight type CatalogProductHighlight struct { // The highlight content. - HighlightContent *string `json:"highlightContent,omitempty"` + HighlightContent CatalogProductHighlightGetHighlightContentAttributeType `json:"highlightContent,omitempty"` // The highlight icon. - HighlightIcon *string `json:"highlightIcon,omitempty"` + HighlightIcon CatalogProductHighlightGetHighlightIconAttributeType `json:"highlightIcon,omitempty"` // The highlight title. - HighlightTitle *string `json:"highlightTitle,omitempty"` + HighlightTitle CatalogProductHighlightGetHighlightTitleAttributeType `json:"highlightTitle,omitempty"` } // NewCatalogProductHighlight instantiates a new CatalogProductHighlight object @@ -45,111 +108,84 @@ func NewCatalogProductHighlightWithDefaults() *CatalogProductHighlight { } // GetHighlightContent returns the HighlightContent field value if set, zero value otherwise. -func (o *CatalogProductHighlight) GetHighlightContent() *string { - if o == nil || IsNil(o.HighlightContent) { - var ret *string - return ret - } - return o.HighlightContent +func (o *CatalogProductHighlight) GetHighlightContent() (res CatalogProductHighlightGetHighlightContentRetType) { + res, _ = o.GetHighlightContentOk() + return } // GetHighlightContentOk returns a tuple with the HighlightContent field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatalogProductHighlight) GetHighlightContentOk() (*string, bool) { - if o == nil || IsNil(o.HighlightContent) { - return nil, false - } - return o.HighlightContent, true +func (o *CatalogProductHighlight) GetHighlightContentOk() (ret CatalogProductHighlightGetHighlightContentRetType, ok bool) { + return getCatalogProductHighlightGetHighlightContentAttributeTypeOk(o.HighlightContent) } // HasHighlightContent returns a boolean if a field has been set. func (o *CatalogProductHighlight) HasHighlightContent() bool { - if o != nil && !IsNil(o.HighlightContent) { - return true - } - - return false + _, ok := o.GetHighlightContentOk() + return ok } // SetHighlightContent gets a reference to the given string and assigns it to the HighlightContent field. -func (o *CatalogProductHighlight) SetHighlightContent(v *string) { - o.HighlightContent = v +func (o *CatalogProductHighlight) SetHighlightContent(v CatalogProductHighlightGetHighlightContentRetType) { + setCatalogProductHighlightGetHighlightContentAttributeType(&o.HighlightContent, v) } // GetHighlightIcon returns the HighlightIcon field value if set, zero value otherwise. -func (o *CatalogProductHighlight) GetHighlightIcon() *string { - if o == nil || IsNil(o.HighlightIcon) { - var ret *string - return ret - } - return o.HighlightIcon +func (o *CatalogProductHighlight) GetHighlightIcon() (res CatalogProductHighlightGetHighlightIconRetType) { + res, _ = o.GetHighlightIconOk() + return } // GetHighlightIconOk returns a tuple with the HighlightIcon field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatalogProductHighlight) GetHighlightIconOk() (*string, bool) { - if o == nil || IsNil(o.HighlightIcon) { - return nil, false - } - return o.HighlightIcon, true +func (o *CatalogProductHighlight) GetHighlightIconOk() (ret CatalogProductHighlightGetHighlightIconRetType, ok bool) { + return getCatalogProductHighlightGetHighlightIconAttributeTypeOk(o.HighlightIcon) } // HasHighlightIcon returns a boolean if a field has been set. func (o *CatalogProductHighlight) HasHighlightIcon() bool { - if o != nil && !IsNil(o.HighlightIcon) { - return true - } - - return false + _, ok := o.GetHighlightIconOk() + return ok } // SetHighlightIcon gets a reference to the given string and assigns it to the HighlightIcon field. -func (o *CatalogProductHighlight) SetHighlightIcon(v *string) { - o.HighlightIcon = v +func (o *CatalogProductHighlight) SetHighlightIcon(v CatalogProductHighlightGetHighlightIconRetType) { + setCatalogProductHighlightGetHighlightIconAttributeType(&o.HighlightIcon, v) } // GetHighlightTitle returns the HighlightTitle field value if set, zero value otherwise. -func (o *CatalogProductHighlight) GetHighlightTitle() *string { - if o == nil || IsNil(o.HighlightTitle) { - var ret *string - return ret - } - return o.HighlightTitle +func (o *CatalogProductHighlight) GetHighlightTitle() (res CatalogProductHighlightGetHighlightTitleRetType) { + res, _ = o.GetHighlightTitleOk() + return } // GetHighlightTitleOk returns a tuple with the HighlightTitle field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatalogProductHighlight) GetHighlightTitleOk() (*string, bool) { - if o == nil || IsNil(o.HighlightTitle) { - return nil, false - } - return o.HighlightTitle, true +func (o *CatalogProductHighlight) GetHighlightTitleOk() (ret CatalogProductHighlightGetHighlightTitleRetType, ok bool) { + return getCatalogProductHighlightGetHighlightTitleAttributeTypeOk(o.HighlightTitle) } // HasHighlightTitle returns a boolean if a field has been set. func (o *CatalogProductHighlight) HasHighlightTitle() bool { - if o != nil && !IsNil(o.HighlightTitle) { - return true - } - - return false + _, ok := o.GetHighlightTitleOk() + return ok } // SetHighlightTitle gets a reference to the given string and assigns it to the HighlightTitle field. -func (o *CatalogProductHighlight) SetHighlightTitle(v *string) { - o.HighlightTitle = v +func (o *CatalogProductHighlight) SetHighlightTitle(v CatalogProductHighlightGetHighlightTitleRetType) { + setCatalogProductHighlightGetHighlightTitleAttributeType(&o.HighlightTitle, v) } func (o CatalogProductHighlight) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.HighlightContent) { - toSerialize["highlightContent"] = o.HighlightContent + if val, ok := getCatalogProductHighlightGetHighlightContentAttributeTypeOk(o.HighlightContent); ok { + toSerialize["HighlightContent"] = val } - if !IsNil(o.HighlightIcon) { - toSerialize["highlightIcon"] = o.HighlightIcon + if val, ok := getCatalogProductHighlightGetHighlightIconAttributeTypeOk(o.HighlightIcon); ok { + toSerialize["HighlightIcon"] = val } - if !IsNil(o.HighlightTitle) { - toSerialize["highlightTitle"] = o.HighlightTitle + if val, ok := getCatalogProductHighlightGetHighlightTitleAttributeTypeOk(o.HighlightTitle); ok { + toSerialize["HighlightTitle"] = val } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_catalog_product_overview.go b/services/stackitmarketplace/model_catalog_product_overview.go index 133bdc066..6d6cdb548 100644 --- a/services/stackitmarketplace/model_catalog_product_overview.go +++ b/services/stackitmarketplace/model_catalog_product_overview.go @@ -17,27 +17,171 @@ import ( // checks if the CatalogProductOverview type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CatalogProductOverview{} +/* + types and functions for deliveryMethod +*/ + +// isEnumRef +type CatalogProductOverviewGetDeliveryMethodAttributeType = *string +type CatalogProductOverviewGetDeliveryMethodArgType = string +type CatalogProductOverviewGetDeliveryMethodRetType = string + +func getCatalogProductOverviewGetDeliveryMethodAttributeTypeOk(arg CatalogProductOverviewGetDeliveryMethodAttributeType) (ret CatalogProductOverviewGetDeliveryMethodRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductOverviewGetDeliveryMethodAttributeType(arg *CatalogProductOverviewGetDeliveryMethodAttributeType, val CatalogProductOverviewGetDeliveryMethodRetType) { + *arg = &val +} + +/* + types and functions for lifecycleState +*/ + +// isEnumRef +type CatalogProductOverviewGetLifecycleStateAttributeType = *string +type CatalogProductOverviewGetLifecycleStateArgType = string +type CatalogProductOverviewGetLifecycleStateRetType = string + +func getCatalogProductOverviewGetLifecycleStateAttributeTypeOk(arg CatalogProductOverviewGetLifecycleStateAttributeType) (ret CatalogProductOverviewGetLifecycleStateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductOverviewGetLifecycleStateAttributeType(arg *CatalogProductOverviewGetLifecycleStateAttributeType, val CatalogProductOverviewGetLifecycleStateRetType) { + *arg = &val +} + +/* + types and functions for logo +*/ + +// isNotNullableString +type CatalogProductOverviewGetLogoAttributeType = *string + +func getCatalogProductOverviewGetLogoAttributeTypeOk(arg CatalogProductOverviewGetLogoAttributeType) (ret CatalogProductOverviewGetLogoRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductOverviewGetLogoAttributeType(arg *CatalogProductOverviewGetLogoAttributeType, val CatalogProductOverviewGetLogoRetType) { + *arg = &val +} + +type CatalogProductOverviewGetLogoArgType = string +type CatalogProductOverviewGetLogoRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type CatalogProductOverviewGetNameAttributeType = *string + +func getCatalogProductOverviewGetNameAttributeTypeOk(arg CatalogProductOverviewGetNameAttributeType) (ret CatalogProductOverviewGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductOverviewGetNameAttributeType(arg *CatalogProductOverviewGetNameAttributeType, val CatalogProductOverviewGetNameRetType) { + *arg = &val +} + +type CatalogProductOverviewGetNameArgType = string +type CatalogProductOverviewGetNameRetType = string + +/* + types and functions for productId +*/ + +// isNotNullableString +type CatalogProductOverviewGetProductIdAttributeType = *string + +func getCatalogProductOverviewGetProductIdAttributeTypeOk(arg CatalogProductOverviewGetProductIdAttributeType) (ret CatalogProductOverviewGetProductIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductOverviewGetProductIdAttributeType(arg *CatalogProductOverviewGetProductIdAttributeType, val CatalogProductOverviewGetProductIdRetType) { + *arg = &val +} + +type CatalogProductOverviewGetProductIdArgType = string +type CatalogProductOverviewGetProductIdRetType = string + +/* + types and functions for summary +*/ + +// isNotNullableString +type CatalogProductOverviewGetSummaryAttributeType = *string + +func getCatalogProductOverviewGetSummaryAttributeTypeOk(arg CatalogProductOverviewGetSummaryAttributeType) (ret CatalogProductOverviewGetSummaryRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductOverviewGetSummaryAttributeType(arg *CatalogProductOverviewGetSummaryAttributeType, val CatalogProductOverviewGetSummaryRetType) { + *arg = &val +} + +type CatalogProductOverviewGetSummaryArgType = string +type CatalogProductOverviewGetSummaryRetType = string + +/* + types and functions for vendor +*/ + +// isModel +type CatalogProductOverviewGetVendorAttributeType = *CatalogProductOverviewVendor +type CatalogProductOverviewGetVendorArgType = CatalogProductOverviewVendor +type CatalogProductOverviewGetVendorRetType = CatalogProductOverviewVendor + +func getCatalogProductOverviewGetVendorAttributeTypeOk(arg CatalogProductOverviewGetVendorAttributeType) (ret CatalogProductOverviewGetVendorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductOverviewGetVendorAttributeType(arg *CatalogProductOverviewGetVendorAttributeType, val CatalogProductOverviewGetVendorRetType) { + *arg = &val +} + // CatalogProductOverview struct for CatalogProductOverview type CatalogProductOverview struct { // The product type. For reference: SAAS - Software as a Service, SAI - STACKIT Application Image // REQUIRED - DeliveryMethod *string `json:"deliveryMethod"` + DeliveryMethod CatalogProductOverviewGetDeliveryMethodAttributeType `json:"deliveryMethod"` // The lifecycle state of the product. // REQUIRED - LifecycleState *string `json:"lifecycleState"` + LifecycleState CatalogProductOverviewGetLifecycleStateAttributeType `json:"lifecycleState"` // The logo base64 encoded. - Logo *string `json:"logo,omitempty"` + Logo CatalogProductOverviewGetLogoAttributeType `json:"logo,omitempty"` // The product name. // REQUIRED - Name *string `json:"name"` + Name CatalogProductOverviewGetNameAttributeType `json:"name"` // The product ID. // REQUIRED - ProductId *string `json:"productId"` + ProductId CatalogProductOverviewGetProductIdAttributeType `json:"productId"` // The short summary of the product. // REQUIRED - Summary *string `json:"summary"` + Summary CatalogProductOverviewGetSummaryAttributeType `json:"summary"` // REQUIRED - Vendor *CatalogProductOverviewVendor `json:"vendor"` + Vendor CatalogProductOverviewGetVendorAttributeType `json:"vendor"` } type _CatalogProductOverview CatalogProductOverview @@ -46,14 +190,14 @@ type _CatalogProductOverview CatalogProductOverview // 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 NewCatalogProductOverview(deliveryMethod *string, lifecycleState *string, name *string, productId *string, summary *string, vendor *CatalogProductOverviewVendor) *CatalogProductOverview { +func NewCatalogProductOverview(deliveryMethod CatalogProductOverviewGetDeliveryMethodArgType, lifecycleState CatalogProductOverviewGetLifecycleStateArgType, name CatalogProductOverviewGetNameArgType, productId CatalogProductOverviewGetProductIdArgType, summary CatalogProductOverviewGetSummaryArgType, vendor CatalogProductOverviewGetVendorArgType) *CatalogProductOverview { this := CatalogProductOverview{} - this.DeliveryMethod = deliveryMethod - this.LifecycleState = lifecycleState - this.Name = name - this.ProductId = productId - this.Summary = summary - this.Vendor = vendor + setCatalogProductOverviewGetDeliveryMethodAttributeType(&this.DeliveryMethod, deliveryMethod) + setCatalogProductOverviewGetLifecycleStateAttributeType(&this.LifecycleState, lifecycleState) + setCatalogProductOverviewGetNameAttributeType(&this.Name, name) + setCatalogProductOverviewGetProductIdAttributeType(&this.ProductId, productId) + setCatalogProductOverviewGetSummaryAttributeType(&this.Summary, summary) + setCatalogProductOverviewGetVendorAttributeType(&this.Vendor, vendor) return &this } @@ -66,192 +210,153 @@ func NewCatalogProductOverviewWithDefaults() *CatalogProductOverview { } // GetDeliveryMethod returns the DeliveryMethod field value -func (o *CatalogProductOverview) GetDeliveryMethod() *string { - if o == nil || IsNil(o.DeliveryMethod) { - var ret *string - return ret - } - - return o.DeliveryMethod +func (o *CatalogProductOverview) GetDeliveryMethod() (ret CatalogProductOverviewGetDeliveryMethodRetType) { + ret, _ = o.GetDeliveryMethodOk() + return ret } // GetDeliveryMethodOk returns a tuple with the DeliveryMethod field value // and a boolean to check if the value has been set. -func (o *CatalogProductOverview) GetDeliveryMethodOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DeliveryMethod, true +func (o *CatalogProductOverview) GetDeliveryMethodOk() (ret CatalogProductOverviewGetDeliveryMethodRetType, ok bool) { + return getCatalogProductOverviewGetDeliveryMethodAttributeTypeOk(o.DeliveryMethod) } // SetDeliveryMethod sets field value -func (o *CatalogProductOverview) SetDeliveryMethod(v *string) { - o.DeliveryMethod = v +func (o *CatalogProductOverview) SetDeliveryMethod(v CatalogProductOverviewGetDeliveryMethodRetType) { + setCatalogProductOverviewGetDeliveryMethodAttributeType(&o.DeliveryMethod, v) } // GetLifecycleState returns the LifecycleState field value -func (o *CatalogProductOverview) GetLifecycleState() *string { - if o == nil || IsNil(o.LifecycleState) { - var ret *string - return ret - } - - return o.LifecycleState +func (o *CatalogProductOverview) GetLifecycleState() (ret CatalogProductOverviewGetLifecycleStateRetType) { + ret, _ = o.GetLifecycleStateOk() + return ret } // GetLifecycleStateOk returns a tuple with the LifecycleState field value // and a boolean to check if the value has been set. -func (o *CatalogProductOverview) GetLifecycleStateOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.LifecycleState, true +func (o *CatalogProductOverview) GetLifecycleStateOk() (ret CatalogProductOverviewGetLifecycleStateRetType, ok bool) { + return getCatalogProductOverviewGetLifecycleStateAttributeTypeOk(o.LifecycleState) } // SetLifecycleState sets field value -func (o *CatalogProductOverview) SetLifecycleState(v *string) { - o.LifecycleState = v +func (o *CatalogProductOverview) SetLifecycleState(v CatalogProductOverviewGetLifecycleStateRetType) { + setCatalogProductOverviewGetLifecycleStateAttributeType(&o.LifecycleState, v) } // GetLogo returns the Logo field value if set, zero value otherwise. -func (o *CatalogProductOverview) GetLogo() *string { - if o == nil || IsNil(o.Logo) { - var ret *string - return ret - } - return o.Logo +func (o *CatalogProductOverview) GetLogo() (res CatalogProductOverviewGetLogoRetType) { + res, _ = o.GetLogoOk() + return } // GetLogoOk returns a tuple with the Logo field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatalogProductOverview) GetLogoOk() (*string, bool) { - if o == nil || IsNil(o.Logo) { - return nil, false - } - return o.Logo, true +func (o *CatalogProductOverview) GetLogoOk() (ret CatalogProductOverviewGetLogoRetType, ok bool) { + return getCatalogProductOverviewGetLogoAttributeTypeOk(o.Logo) } // HasLogo returns a boolean if a field has been set. func (o *CatalogProductOverview) HasLogo() bool { - if o != nil && !IsNil(o.Logo) { - return true - } - - return false + _, ok := o.GetLogoOk() + return ok } // SetLogo gets a reference to the given string and assigns it to the Logo field. -func (o *CatalogProductOverview) SetLogo(v *string) { - o.Logo = v +func (o *CatalogProductOverview) SetLogo(v CatalogProductOverviewGetLogoRetType) { + setCatalogProductOverviewGetLogoAttributeType(&o.Logo, v) } // GetName returns the Name field value -func (o *CatalogProductOverview) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *CatalogProductOverview) GetName() (ret CatalogProductOverviewGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *CatalogProductOverview) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true +func (o *CatalogProductOverview) GetNameOk() (ret CatalogProductOverviewGetNameRetType, ok bool) { + return getCatalogProductOverviewGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *CatalogProductOverview) SetName(v *string) { - o.Name = v +func (o *CatalogProductOverview) SetName(v CatalogProductOverviewGetNameRetType) { + setCatalogProductOverviewGetNameAttributeType(&o.Name, v) } // GetProductId returns the ProductId field value -func (o *CatalogProductOverview) GetProductId() *string { - if o == nil || IsNil(o.ProductId) { - var ret *string - return ret - } - - return o.ProductId +func (o *CatalogProductOverview) GetProductId() (ret CatalogProductOverviewGetProductIdRetType) { + 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 *CatalogProductOverview) GetProductIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ProductId, true +func (o *CatalogProductOverview) GetProductIdOk() (ret CatalogProductOverviewGetProductIdRetType, ok bool) { + return getCatalogProductOverviewGetProductIdAttributeTypeOk(o.ProductId) } // SetProductId sets field value -func (o *CatalogProductOverview) SetProductId(v *string) { - o.ProductId = v +func (o *CatalogProductOverview) SetProductId(v CatalogProductOverviewGetProductIdRetType) { + setCatalogProductOverviewGetProductIdAttributeType(&o.ProductId, v) } // GetSummary returns the Summary field value -func (o *CatalogProductOverview) GetSummary() *string { - if o == nil || IsNil(o.Summary) { - var ret *string - return ret - } - - return o.Summary +func (o *CatalogProductOverview) GetSummary() (ret CatalogProductOverviewGetSummaryRetType) { + ret, _ = o.GetSummaryOk() + return ret } // GetSummaryOk returns a tuple with the Summary field value // and a boolean to check if the value has been set. -func (o *CatalogProductOverview) GetSummaryOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Summary, true +func (o *CatalogProductOverview) GetSummaryOk() (ret CatalogProductOverviewGetSummaryRetType, ok bool) { + return getCatalogProductOverviewGetSummaryAttributeTypeOk(o.Summary) } // SetSummary sets field value -func (o *CatalogProductOverview) SetSummary(v *string) { - o.Summary = v +func (o *CatalogProductOverview) SetSummary(v CatalogProductOverviewGetSummaryRetType) { + setCatalogProductOverviewGetSummaryAttributeType(&o.Summary, v) } // GetVendor returns the Vendor field value -func (o *CatalogProductOverview) GetVendor() *CatalogProductOverviewVendor { - if o == nil || IsNil(o.Vendor) { - var ret *CatalogProductOverviewVendor - return ret - } - - return o.Vendor +func (o *CatalogProductOverview) GetVendor() (ret CatalogProductOverviewGetVendorRetType) { + ret, _ = o.GetVendorOk() + return ret } // GetVendorOk returns a tuple with the Vendor field value // and a boolean to check if the value has been set. -func (o *CatalogProductOverview) GetVendorOk() (*CatalogProductOverviewVendor, bool) { - if o == nil { - return nil, false - } - return o.Vendor, true +func (o *CatalogProductOverview) GetVendorOk() (ret CatalogProductOverviewGetVendorRetType, ok bool) { + return getCatalogProductOverviewGetVendorAttributeTypeOk(o.Vendor) } // SetVendor sets field value -func (o *CatalogProductOverview) SetVendor(v *CatalogProductOverviewVendor) { - o.Vendor = v +func (o *CatalogProductOverview) SetVendor(v CatalogProductOverviewGetVendorRetType) { + setCatalogProductOverviewGetVendorAttributeType(&o.Vendor, v) } func (o CatalogProductOverview) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["deliveryMethod"] = o.DeliveryMethod - toSerialize["lifecycleState"] = o.LifecycleState - if !IsNil(o.Logo) { - toSerialize["logo"] = o.Logo + if val, ok := getCatalogProductOverviewGetDeliveryMethodAttributeTypeOk(o.DeliveryMethod); ok { + toSerialize["DeliveryMethod"] = val + } + if val, ok := getCatalogProductOverviewGetLifecycleStateAttributeTypeOk(o.LifecycleState); ok { + toSerialize["LifecycleState"] = val + } + if val, ok := getCatalogProductOverviewGetLogoAttributeTypeOk(o.Logo); ok { + toSerialize["Logo"] = val + } + if val, ok := getCatalogProductOverviewGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getCatalogProductOverviewGetProductIdAttributeTypeOk(o.ProductId); ok { + toSerialize["ProductId"] = val + } + if val, ok := getCatalogProductOverviewGetSummaryAttributeTypeOk(o.Summary); ok { + toSerialize["Summary"] = val + } + if val, ok := getCatalogProductOverviewGetVendorAttributeTypeOk(o.Vendor); ok { + toSerialize["Vendor"] = val } - toSerialize["name"] = o.Name - toSerialize["productId"] = o.ProductId - toSerialize["summary"] = o.Summary - toSerialize["vendor"] = o.Vendor return toSerialize, nil } diff --git a/services/stackitmarketplace/model_catalog_product_overview_vendor.go b/services/stackitmarketplace/model_catalog_product_overview_vendor.go index dc7bbb802..d56d69ecf 100644 --- a/services/stackitmarketplace/model_catalog_product_overview_vendor.go +++ b/services/stackitmarketplace/model_catalog_product_overview_vendor.go @@ -17,17 +17,80 @@ import ( // checks if the CatalogProductOverviewVendor type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CatalogProductOverviewVendor{} +/* + types and functions for name +*/ + +// isNotNullableString +type CatalogProductOverviewVendorGetNameAttributeType = *string + +func getCatalogProductOverviewVendorGetNameAttributeTypeOk(arg CatalogProductOverviewVendorGetNameAttributeType) (ret CatalogProductOverviewVendorGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductOverviewVendorGetNameAttributeType(arg *CatalogProductOverviewVendorGetNameAttributeType, val CatalogProductOverviewVendorGetNameRetType) { + *arg = &val +} + +type CatalogProductOverviewVendorGetNameArgType = string +type CatalogProductOverviewVendorGetNameRetType = string + +/* + types and functions for vendorId +*/ + +// isNotNullableString +type CatalogProductOverviewVendorGetVendorIdAttributeType = *string + +func getCatalogProductOverviewVendorGetVendorIdAttributeTypeOk(arg CatalogProductOverviewVendorGetVendorIdAttributeType) (ret CatalogProductOverviewVendorGetVendorIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductOverviewVendorGetVendorIdAttributeType(arg *CatalogProductOverviewVendorGetVendorIdAttributeType, val CatalogProductOverviewVendorGetVendorIdRetType) { + *arg = &val +} + +type CatalogProductOverviewVendorGetVendorIdArgType = string +type CatalogProductOverviewVendorGetVendorIdRetType = string + +/* + types and functions for websiteUrl +*/ + +// isNotNullableString +type CatalogProductOverviewVendorGetWebsiteUrlAttributeType = *string + +func getCatalogProductOverviewVendorGetWebsiteUrlAttributeTypeOk(arg CatalogProductOverviewVendorGetWebsiteUrlAttributeType) (ret CatalogProductOverviewVendorGetWebsiteUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductOverviewVendorGetWebsiteUrlAttributeType(arg *CatalogProductOverviewVendorGetWebsiteUrlAttributeType, val CatalogProductOverviewVendorGetWebsiteUrlRetType) { + *arg = &val +} + +type CatalogProductOverviewVendorGetWebsiteUrlArgType = string +type CatalogProductOverviewVendorGetWebsiteUrlRetType = string + // CatalogProductOverviewVendor struct for CatalogProductOverviewVendor type CatalogProductOverviewVendor struct { // The vendor name. // REQUIRED - Name *string `json:"name"` + Name CatalogProductOverviewVendorGetNameAttributeType `json:"name"` // The vendor ID. // REQUIRED - VendorId *string `json:"vendorId"` + VendorId CatalogProductOverviewVendorGetVendorIdAttributeType `json:"vendorId"` // The vendor website URL. // REQUIRED - WebsiteUrl *string `json:"websiteUrl"` + WebsiteUrl CatalogProductOverviewVendorGetWebsiteUrlAttributeType `json:"websiteUrl"` } type _CatalogProductOverviewVendor CatalogProductOverviewVendor @@ -36,11 +99,11 @@ type _CatalogProductOverviewVendor CatalogProductOverviewVendor // 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 NewCatalogProductOverviewVendor(name *string, vendorId *string, websiteUrl *string) *CatalogProductOverviewVendor { +func NewCatalogProductOverviewVendor(name CatalogProductOverviewVendorGetNameArgType, vendorId CatalogProductOverviewVendorGetVendorIdArgType, websiteUrl CatalogProductOverviewVendorGetWebsiteUrlArgType) *CatalogProductOverviewVendor { this := CatalogProductOverviewVendor{} - this.Name = name - this.VendorId = vendorId - this.WebsiteUrl = websiteUrl + setCatalogProductOverviewVendorGetNameAttributeType(&this.Name, name) + setCatalogProductOverviewVendorGetVendorIdAttributeType(&this.VendorId, vendorId) + setCatalogProductOverviewVendorGetWebsiteUrlAttributeType(&this.WebsiteUrl, websiteUrl) return &this } @@ -53,82 +116,67 @@ func NewCatalogProductOverviewVendorWithDefaults() *CatalogProductOverviewVendor } // GetName returns the Name field value -func (o *CatalogProductOverviewVendor) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *CatalogProductOverviewVendor) GetName() (ret CatalogProductOverviewVendorGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *CatalogProductOverviewVendor) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true +func (o *CatalogProductOverviewVendor) GetNameOk() (ret CatalogProductOverviewVendorGetNameRetType, ok bool) { + return getCatalogProductOverviewVendorGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *CatalogProductOverviewVendor) SetName(v *string) { - o.Name = v +func (o *CatalogProductOverviewVendor) SetName(v CatalogProductOverviewVendorGetNameRetType) { + setCatalogProductOverviewVendorGetNameAttributeType(&o.Name, v) } // GetVendorId returns the VendorId field value -func (o *CatalogProductOverviewVendor) GetVendorId() *string { - if o == nil || IsNil(o.VendorId) { - var ret *string - return ret - } - - return o.VendorId +func (o *CatalogProductOverviewVendor) GetVendorId() (ret CatalogProductOverviewVendorGetVendorIdRetType) { + ret, _ = o.GetVendorIdOk() + return ret } // GetVendorIdOk returns a tuple with the VendorId field value // and a boolean to check if the value has been set. -func (o *CatalogProductOverviewVendor) GetVendorIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.VendorId, true +func (o *CatalogProductOverviewVendor) GetVendorIdOk() (ret CatalogProductOverviewVendorGetVendorIdRetType, ok bool) { + return getCatalogProductOverviewVendorGetVendorIdAttributeTypeOk(o.VendorId) } // SetVendorId sets field value -func (o *CatalogProductOverviewVendor) SetVendorId(v *string) { - o.VendorId = v +func (o *CatalogProductOverviewVendor) SetVendorId(v CatalogProductOverviewVendorGetVendorIdRetType) { + setCatalogProductOverviewVendorGetVendorIdAttributeType(&o.VendorId, v) } // GetWebsiteUrl returns the WebsiteUrl field value -func (o *CatalogProductOverviewVendor) GetWebsiteUrl() *string { - if o == nil || IsNil(o.WebsiteUrl) { - var ret *string - return ret - } - - return o.WebsiteUrl +func (o *CatalogProductOverviewVendor) GetWebsiteUrl() (ret CatalogProductOverviewVendorGetWebsiteUrlRetType) { + ret, _ = o.GetWebsiteUrlOk() + return ret } // GetWebsiteUrlOk returns a tuple with the WebsiteUrl field value // and a boolean to check if the value has been set. -func (o *CatalogProductOverviewVendor) GetWebsiteUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.WebsiteUrl, true +func (o *CatalogProductOverviewVendor) GetWebsiteUrlOk() (ret CatalogProductOverviewVendorGetWebsiteUrlRetType, ok bool) { + return getCatalogProductOverviewVendorGetWebsiteUrlAttributeTypeOk(o.WebsiteUrl) } // SetWebsiteUrl sets field value -func (o *CatalogProductOverviewVendor) SetWebsiteUrl(v *string) { - o.WebsiteUrl = v +func (o *CatalogProductOverviewVendor) SetWebsiteUrl(v CatalogProductOverviewVendorGetWebsiteUrlRetType) { + setCatalogProductOverviewVendorGetWebsiteUrlAttributeType(&o.WebsiteUrl, v) } func (o CatalogProductOverviewVendor) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - toSerialize["vendorId"] = o.VendorId - toSerialize["websiteUrl"] = o.WebsiteUrl + if val, ok := getCatalogProductOverviewVendorGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getCatalogProductOverviewVendorGetVendorIdAttributeTypeOk(o.VendorId); ok { + toSerialize["VendorId"] = val + } + if val, ok := getCatalogProductOverviewVendorGetWebsiteUrlAttributeTypeOk(o.WebsiteUrl); ok { + toSerialize["WebsiteUrl"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_catalog_product_pricing_option.go b/services/stackitmarketplace/model_catalog_product_pricing_option.go index 86487579c..2215b12fa 100644 --- a/services/stackitmarketplace/model_catalog_product_pricing_option.go +++ b/services/stackitmarketplace/model_catalog_product_pricing_option.go @@ -17,34 +17,242 @@ import ( // checks if the CatalogProductPricingOption type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CatalogProductPricingOption{} +/* + types and functions for description +*/ + +// isNotNullableString +type CatalogProductPricingOptionGetDescriptionAttributeType = *string + +func getCatalogProductPricingOptionGetDescriptionAttributeTypeOk(arg CatalogProductPricingOptionGetDescriptionAttributeType) (ret CatalogProductPricingOptionGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductPricingOptionGetDescriptionAttributeType(arg *CatalogProductPricingOptionGetDescriptionAttributeType, val CatalogProductPricingOptionGetDescriptionRetType) { + *arg = &val +} + +type CatalogProductPricingOptionGetDescriptionArgType = string +type CatalogProductPricingOptionGetDescriptionRetType = string + +/* + types and functions for highlights +*/ + +// isArray +type CatalogProductPricingOptionGetHighlightsAttributeType = *[]CatalogPricingOptionHighlight +type CatalogProductPricingOptionGetHighlightsArgType = []CatalogPricingOptionHighlight +type CatalogProductPricingOptionGetHighlightsRetType = []CatalogPricingOptionHighlight + +func getCatalogProductPricingOptionGetHighlightsAttributeTypeOk(arg CatalogProductPricingOptionGetHighlightsAttributeType) (ret CatalogProductPricingOptionGetHighlightsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductPricingOptionGetHighlightsAttributeType(arg *CatalogProductPricingOptionGetHighlightsAttributeType, val CatalogProductPricingOptionGetHighlightsRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type CatalogProductPricingOptionGetNameAttributeType = *string + +func getCatalogProductPricingOptionGetNameAttributeTypeOk(arg CatalogProductPricingOptionGetNameAttributeType) (ret CatalogProductPricingOptionGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductPricingOptionGetNameAttributeType(arg *CatalogProductPricingOptionGetNameAttributeType, val CatalogProductPricingOptionGetNameRetType) { + *arg = &val +} + +type CatalogProductPricingOptionGetNameArgType = string +type CatalogProductPricingOptionGetNameRetType = string + +/* + types and functions for priceType +*/ + +// isEnumRef +type CatalogProductPricingOptionGetPriceTypeAttributeType = *string +type CatalogProductPricingOptionGetPriceTypeArgType = string +type CatalogProductPricingOptionGetPriceTypeRetType = string + +func getCatalogProductPricingOptionGetPriceTypeAttributeTypeOk(arg CatalogProductPricingOptionGetPriceTypeAttributeType) (ret CatalogProductPricingOptionGetPriceTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductPricingOptionGetPriceTypeAttributeType(arg *CatalogProductPricingOptionGetPriceTypeAttributeType, val CatalogProductPricingOptionGetPriceTypeRetType) { + *arg = &val +} + +/* + types and functions for pricingPlan +*/ + +// isNotNullableString +type CatalogProductPricingOptionGetPricingPlanAttributeType = *string + +func getCatalogProductPricingOptionGetPricingPlanAttributeTypeOk(arg CatalogProductPricingOptionGetPricingPlanAttributeType) (ret CatalogProductPricingOptionGetPricingPlanRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductPricingOptionGetPricingPlanAttributeType(arg *CatalogProductPricingOptionGetPricingPlanAttributeType, val CatalogProductPricingOptionGetPricingPlanRetType) { + *arg = &val +} + +type CatalogProductPricingOptionGetPricingPlanArgType = string +type CatalogProductPricingOptionGetPricingPlanRetType = string + +/* + types and functions for rate +*/ + +// isNotNullableString +type CatalogProductPricingOptionGetRateAttributeType = *string + +func getCatalogProductPricingOptionGetRateAttributeTypeOk(arg CatalogProductPricingOptionGetRateAttributeType) (ret CatalogProductPricingOptionGetRateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductPricingOptionGetRateAttributeType(arg *CatalogProductPricingOptionGetRateAttributeType, val CatalogProductPricingOptionGetRateRetType) { + *arg = &val +} + +type CatalogProductPricingOptionGetRateArgType = string +type CatalogProductPricingOptionGetRateRetType = string + +/* + types and functions for sku +*/ + +// isNotNullableString +type CatalogProductPricingOptionGetSkuAttributeType = *string + +func getCatalogProductPricingOptionGetSkuAttributeTypeOk(arg CatalogProductPricingOptionGetSkuAttributeType) (ret CatalogProductPricingOptionGetSkuRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductPricingOptionGetSkuAttributeType(arg *CatalogProductPricingOptionGetSkuAttributeType, val CatalogProductPricingOptionGetSkuRetType) { + *arg = &val +} + +type CatalogProductPricingOptionGetSkuArgType = string +type CatalogProductPricingOptionGetSkuRetType = string + +/* + types and functions for skuInfo +*/ + +// isNotNullableString +type CatalogProductPricingOptionGetSkuInfoAttributeType = *string + +func getCatalogProductPricingOptionGetSkuInfoAttributeTypeOk(arg CatalogProductPricingOptionGetSkuInfoAttributeType) (ret CatalogProductPricingOptionGetSkuInfoRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductPricingOptionGetSkuInfoAttributeType(arg *CatalogProductPricingOptionGetSkuInfoAttributeType, val CatalogProductPricingOptionGetSkuInfoRetType) { + *arg = &val +} + +type CatalogProductPricingOptionGetSkuInfoArgType = string +type CatalogProductPricingOptionGetSkuInfoRetType = string + +/* + types and functions for skuInfoDetails +*/ + +// isNotNullableString +type CatalogProductPricingOptionGetSkuInfoDetailsAttributeType = *string + +func getCatalogProductPricingOptionGetSkuInfoDetailsAttributeTypeOk(arg CatalogProductPricingOptionGetSkuInfoDetailsAttributeType) (ret CatalogProductPricingOptionGetSkuInfoDetailsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductPricingOptionGetSkuInfoDetailsAttributeType(arg *CatalogProductPricingOptionGetSkuInfoDetailsAttributeType, val CatalogProductPricingOptionGetSkuInfoDetailsRetType) { + *arg = &val +} + +type CatalogProductPricingOptionGetSkuInfoDetailsArgType = string +type CatalogProductPricingOptionGetSkuInfoDetailsRetType = string + +/* + types and functions for unit +*/ + +// isNotNullableString +type CatalogProductPricingOptionGetUnitAttributeType = *string + +func getCatalogProductPricingOptionGetUnitAttributeTypeOk(arg CatalogProductPricingOptionGetUnitAttributeType) (ret CatalogProductPricingOptionGetUnitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductPricingOptionGetUnitAttributeType(arg *CatalogProductPricingOptionGetUnitAttributeType, val CatalogProductPricingOptionGetUnitRetType) { + *arg = &val +} + +type CatalogProductPricingOptionGetUnitArgType = string +type CatalogProductPricingOptionGetUnitRetType = string + // CatalogProductPricingOption struct for CatalogProductPricingOption type CatalogProductPricingOption struct { // The pricing option description. // REQUIRED - Description *string `json:"description"` + Description CatalogProductPricingOptionGetDescriptionAttributeType `json:"description"` // The list of highlights. // REQUIRED - Highlights *[]CatalogPricingOptionHighlight `json:"highlights"` + Highlights CatalogProductPricingOptionGetHighlightsAttributeType `json:"highlights"` // The pricing option name. // REQUIRED - Name *string `json:"name"` + Name CatalogProductPricingOptionGetNameAttributeType `json:"name"` // The price type / pricing model. - PriceType *string `json:"priceType,omitempty"` + PriceType CatalogProductPricingOptionGetPriceTypeAttributeType `json:"priceType,omitempty"` // Additional price type information. - PricingPlan *string `json:"pricingPlan,omitempty"` + PricingPlan CatalogProductPricingOptionGetPricingPlanAttributeType `json:"pricingPlan,omitempty"` // The price of the product (per unit). - Rate *string `json:"rate,omitempty"` + Rate CatalogProductPricingOptionGetRateAttributeType `json:"rate,omitempty"` // The concrete variant of the product. // REQUIRED - Sku *string `json:"sku"` + Sku CatalogProductPricingOptionGetSkuAttributeType `json:"sku"` // Short description of this offering. // REQUIRED - SkuInfo *string `json:"skuInfo"` + SkuInfo CatalogProductPricingOptionGetSkuInfoAttributeType `json:"skuInfo"` // More details about what this offering entails. // REQUIRED - SkuInfoDetails *string `json:"skuInfoDetails"` + SkuInfoDetails CatalogProductPricingOptionGetSkuInfoDetailsAttributeType `json:"skuInfoDetails"` // The interval to which the rate applies. - Unit *string `json:"unit,omitempty"` + Unit CatalogProductPricingOptionGetUnitAttributeType `json:"unit,omitempty"` } type _CatalogProductPricingOption CatalogProductPricingOption @@ -53,14 +261,14 @@ type _CatalogProductPricingOption CatalogProductPricingOption // 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 NewCatalogProductPricingOption(description *string, highlights *[]CatalogPricingOptionHighlight, name *string, sku *string, skuInfo *string, skuInfoDetails *string) *CatalogProductPricingOption { +func NewCatalogProductPricingOption(description CatalogProductPricingOptionGetDescriptionArgType, highlights CatalogProductPricingOptionGetHighlightsArgType, name CatalogProductPricingOptionGetNameArgType, sku CatalogProductPricingOptionGetSkuArgType, skuInfo CatalogProductPricingOptionGetSkuInfoArgType, skuInfoDetails CatalogProductPricingOptionGetSkuInfoDetailsArgType) *CatalogProductPricingOption { this := CatalogProductPricingOption{} - this.Description = description - this.Highlights = highlights - this.Name = name - this.Sku = sku - this.SkuInfo = skuInfo - this.SkuInfoDetails = skuInfoDetails + setCatalogProductPricingOptionGetDescriptionAttributeType(&this.Description, description) + setCatalogProductPricingOptionGetHighlightsAttributeType(&this.Highlights, highlights) + setCatalogProductPricingOptionGetNameAttributeType(&this.Name, name) + setCatalogProductPricingOptionGetSkuAttributeType(&this.Sku, sku) + setCatalogProductPricingOptionGetSkuInfoAttributeType(&this.SkuInfo, skuInfo) + setCatalogProductPricingOptionGetSkuInfoDetailsAttributeType(&this.SkuInfoDetails, skuInfoDetails) return &this } @@ -73,296 +281,230 @@ func NewCatalogProductPricingOptionWithDefaults() *CatalogProductPricingOption { } // GetDescription returns the Description field value -func (o *CatalogProductPricingOption) GetDescription() *string { - if o == nil || IsNil(o.Description) { - var ret *string - return ret - } - - return o.Description +func (o *CatalogProductPricingOption) GetDescription() (ret CatalogProductPricingOptionGetDescriptionRetType) { + ret, _ = o.GetDescriptionOk() + return ret } // GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Description, true +func (o *CatalogProductPricingOption) GetDescriptionOk() (ret CatalogProductPricingOptionGetDescriptionRetType, ok bool) { + return getCatalogProductPricingOptionGetDescriptionAttributeTypeOk(o.Description) } // SetDescription sets field value -func (o *CatalogProductPricingOption) SetDescription(v *string) { - o.Description = v +func (o *CatalogProductPricingOption) SetDescription(v CatalogProductPricingOptionGetDescriptionRetType) { + setCatalogProductPricingOptionGetDescriptionAttributeType(&o.Description, v) } // GetHighlights returns the Highlights field value -func (o *CatalogProductPricingOption) GetHighlights() *[]CatalogPricingOptionHighlight { - if o == nil || IsNil(o.Highlights) { - var ret *[]CatalogPricingOptionHighlight - return ret - } - - return o.Highlights +func (o *CatalogProductPricingOption) GetHighlights() (ret CatalogProductPricingOptionGetHighlightsRetType) { + ret, _ = o.GetHighlightsOk() + return ret } // GetHighlightsOk returns a tuple with the Highlights field value // and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetHighlightsOk() (*[]CatalogPricingOptionHighlight, bool) { - if o == nil { - return nil, false - } - return o.Highlights, true +func (o *CatalogProductPricingOption) GetHighlightsOk() (ret CatalogProductPricingOptionGetHighlightsRetType, ok bool) { + return getCatalogProductPricingOptionGetHighlightsAttributeTypeOk(o.Highlights) } // SetHighlights sets field value -func (o *CatalogProductPricingOption) SetHighlights(v *[]CatalogPricingOptionHighlight) { - o.Highlights = v +func (o *CatalogProductPricingOption) SetHighlights(v CatalogProductPricingOptionGetHighlightsRetType) { + setCatalogProductPricingOptionGetHighlightsAttributeType(&o.Highlights, v) } // GetName returns the Name field value -func (o *CatalogProductPricingOption) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *CatalogProductPricingOption) GetName() (ret CatalogProductPricingOptionGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true +func (o *CatalogProductPricingOption) GetNameOk() (ret CatalogProductPricingOptionGetNameRetType, ok bool) { + return getCatalogProductPricingOptionGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *CatalogProductPricingOption) SetName(v *string) { - o.Name = v +func (o *CatalogProductPricingOption) SetName(v CatalogProductPricingOptionGetNameRetType) { + setCatalogProductPricingOptionGetNameAttributeType(&o.Name, v) } // GetPriceType returns the PriceType field value if set, zero value otherwise. -func (o *CatalogProductPricingOption) GetPriceType() *string { - if o == nil || IsNil(o.PriceType) { - var ret *string - return ret - } - return o.PriceType +func (o *CatalogProductPricingOption) GetPriceType() (res CatalogProductPricingOptionGetPriceTypeRetType) { + res, _ = o.GetPriceTypeOk() + return } // GetPriceTypeOk returns a tuple with the PriceType field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetPriceTypeOk() (*string, bool) { - if o == nil || IsNil(o.PriceType) { - return nil, false - } - return o.PriceType, true +func (o *CatalogProductPricingOption) GetPriceTypeOk() (ret CatalogProductPricingOptionGetPriceTypeRetType, ok bool) { + return getCatalogProductPricingOptionGetPriceTypeAttributeTypeOk(o.PriceType) } // HasPriceType returns a boolean if a field has been set. func (o *CatalogProductPricingOption) HasPriceType() bool { - if o != nil && !IsNil(o.PriceType) { - return true - } - - return false + _, ok := o.GetPriceTypeOk() + return ok } // SetPriceType gets a reference to the given string and assigns it to the PriceType field. -func (o *CatalogProductPricingOption) SetPriceType(v *string) { - o.PriceType = v +func (o *CatalogProductPricingOption) SetPriceType(v CatalogProductPricingOptionGetPriceTypeRetType) { + setCatalogProductPricingOptionGetPriceTypeAttributeType(&o.PriceType, v) } // GetPricingPlan returns the PricingPlan field value if set, zero value otherwise. -func (o *CatalogProductPricingOption) GetPricingPlan() *string { - if o == nil || IsNil(o.PricingPlan) { - var ret *string - return ret - } - return o.PricingPlan +func (o *CatalogProductPricingOption) GetPricingPlan() (res CatalogProductPricingOptionGetPricingPlanRetType) { + res, _ = o.GetPricingPlanOk() + return } // GetPricingPlanOk returns a tuple with the PricingPlan field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetPricingPlanOk() (*string, bool) { - if o == nil || IsNil(o.PricingPlan) { - return nil, false - } - return o.PricingPlan, true +func (o *CatalogProductPricingOption) GetPricingPlanOk() (ret CatalogProductPricingOptionGetPricingPlanRetType, ok bool) { + return getCatalogProductPricingOptionGetPricingPlanAttributeTypeOk(o.PricingPlan) } // HasPricingPlan returns a boolean if a field has been set. func (o *CatalogProductPricingOption) HasPricingPlan() bool { - if o != nil && !IsNil(o.PricingPlan) { - return true - } - - return false + _, ok := o.GetPricingPlanOk() + return ok } // SetPricingPlan gets a reference to the given string and assigns it to the PricingPlan field. -func (o *CatalogProductPricingOption) SetPricingPlan(v *string) { - o.PricingPlan = v +func (o *CatalogProductPricingOption) SetPricingPlan(v CatalogProductPricingOptionGetPricingPlanRetType) { + setCatalogProductPricingOptionGetPricingPlanAttributeType(&o.PricingPlan, v) } // GetRate returns the Rate field value if set, zero value otherwise. -func (o *CatalogProductPricingOption) GetRate() *string { - if o == nil || IsNil(o.Rate) { - var ret *string - return ret - } - return o.Rate +func (o *CatalogProductPricingOption) GetRate() (res CatalogProductPricingOptionGetRateRetType) { + res, _ = o.GetRateOk() + return } // GetRateOk returns a tuple with the Rate field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetRateOk() (*string, bool) { - if o == nil || IsNil(o.Rate) { - return nil, false - } - return o.Rate, true +func (o *CatalogProductPricingOption) GetRateOk() (ret CatalogProductPricingOptionGetRateRetType, ok bool) { + return getCatalogProductPricingOptionGetRateAttributeTypeOk(o.Rate) } // HasRate returns a boolean if a field has been set. func (o *CatalogProductPricingOption) HasRate() bool { - if o != nil && !IsNil(o.Rate) { - return true - } - - return false + _, ok := o.GetRateOk() + return ok } // SetRate gets a reference to the given string and assigns it to the Rate field. -func (o *CatalogProductPricingOption) SetRate(v *string) { - o.Rate = v +func (o *CatalogProductPricingOption) SetRate(v CatalogProductPricingOptionGetRateRetType) { + setCatalogProductPricingOptionGetRateAttributeType(&o.Rate, v) } // GetSku returns the Sku field value -func (o *CatalogProductPricingOption) GetSku() *string { - if o == nil || IsNil(o.Sku) { - var ret *string - return ret - } - - return o.Sku +func (o *CatalogProductPricingOption) GetSku() (ret CatalogProductPricingOptionGetSkuRetType) { + ret, _ = o.GetSkuOk() + return ret } // GetSkuOk returns a tuple with the Sku field value // and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetSkuOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Sku, true +func (o *CatalogProductPricingOption) GetSkuOk() (ret CatalogProductPricingOptionGetSkuRetType, ok bool) { + return getCatalogProductPricingOptionGetSkuAttributeTypeOk(o.Sku) } // SetSku sets field value -func (o *CatalogProductPricingOption) SetSku(v *string) { - o.Sku = v +func (o *CatalogProductPricingOption) SetSku(v CatalogProductPricingOptionGetSkuRetType) { + setCatalogProductPricingOptionGetSkuAttributeType(&o.Sku, v) } // GetSkuInfo returns the SkuInfo field value -func (o *CatalogProductPricingOption) GetSkuInfo() *string { - if o == nil || IsNil(o.SkuInfo) { - var ret *string - return ret - } - - return o.SkuInfo +func (o *CatalogProductPricingOption) GetSkuInfo() (ret CatalogProductPricingOptionGetSkuInfoRetType) { + ret, _ = o.GetSkuInfoOk() + return ret } // GetSkuInfoOk returns a tuple with the SkuInfo field value // and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetSkuInfoOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.SkuInfo, true +func (o *CatalogProductPricingOption) GetSkuInfoOk() (ret CatalogProductPricingOptionGetSkuInfoRetType, ok bool) { + return getCatalogProductPricingOptionGetSkuInfoAttributeTypeOk(o.SkuInfo) } // SetSkuInfo sets field value -func (o *CatalogProductPricingOption) SetSkuInfo(v *string) { - o.SkuInfo = v +func (o *CatalogProductPricingOption) SetSkuInfo(v CatalogProductPricingOptionGetSkuInfoRetType) { + setCatalogProductPricingOptionGetSkuInfoAttributeType(&o.SkuInfo, v) } // GetSkuInfoDetails returns the SkuInfoDetails field value -func (o *CatalogProductPricingOption) GetSkuInfoDetails() *string { - if o == nil || IsNil(o.SkuInfoDetails) { - var ret *string - return ret - } - - return o.SkuInfoDetails +func (o *CatalogProductPricingOption) GetSkuInfoDetails() (ret CatalogProductPricingOptionGetSkuInfoDetailsRetType) { + ret, _ = o.GetSkuInfoDetailsOk() + return ret } // GetSkuInfoDetailsOk returns a tuple with the SkuInfoDetails field value // and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetSkuInfoDetailsOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.SkuInfoDetails, true +func (o *CatalogProductPricingOption) GetSkuInfoDetailsOk() (ret CatalogProductPricingOptionGetSkuInfoDetailsRetType, ok bool) { + return getCatalogProductPricingOptionGetSkuInfoDetailsAttributeTypeOk(o.SkuInfoDetails) } // SetSkuInfoDetails sets field value -func (o *CatalogProductPricingOption) SetSkuInfoDetails(v *string) { - o.SkuInfoDetails = v +func (o *CatalogProductPricingOption) SetSkuInfoDetails(v CatalogProductPricingOptionGetSkuInfoDetailsRetType) { + setCatalogProductPricingOptionGetSkuInfoDetailsAttributeType(&o.SkuInfoDetails, v) } // GetUnit returns the Unit field value if set, zero value otherwise. -func (o *CatalogProductPricingOption) GetUnit() *string { - if o == nil || IsNil(o.Unit) { - var ret *string - return ret - } - return o.Unit +func (o *CatalogProductPricingOption) GetUnit() (res CatalogProductPricingOptionGetUnitRetType) { + res, _ = o.GetUnitOk() + return } // GetUnitOk returns a tuple with the Unit field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetUnitOk() (*string, bool) { - if o == nil || IsNil(o.Unit) { - return nil, false - } - return o.Unit, true +func (o *CatalogProductPricingOption) GetUnitOk() (ret CatalogProductPricingOptionGetUnitRetType, ok bool) { + return getCatalogProductPricingOptionGetUnitAttributeTypeOk(o.Unit) } // HasUnit returns a boolean if a field has been set. func (o *CatalogProductPricingOption) HasUnit() bool { - if o != nil && !IsNil(o.Unit) { - return true - } - - return false + _, ok := o.GetUnitOk() + return ok } // SetUnit gets a reference to the given string and assigns it to the Unit field. -func (o *CatalogProductPricingOption) SetUnit(v *string) { - o.Unit = v +func (o *CatalogProductPricingOption) SetUnit(v CatalogProductPricingOptionGetUnitRetType) { + setCatalogProductPricingOptionGetUnitAttributeType(&o.Unit, v) } func (o CatalogProductPricingOption) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["description"] = o.Description - toSerialize["highlights"] = o.Highlights - toSerialize["name"] = o.Name - if !IsNil(o.PriceType) { - toSerialize["priceType"] = o.PriceType + if val, ok := getCatalogProductPricingOptionGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getCatalogProductPricingOptionGetHighlightsAttributeTypeOk(o.Highlights); ok { + toSerialize["Highlights"] = val + } + if val, ok := getCatalogProductPricingOptionGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getCatalogProductPricingOptionGetPriceTypeAttributeTypeOk(o.PriceType); ok { + toSerialize["PriceType"] = val + } + if val, ok := getCatalogProductPricingOptionGetPricingPlanAttributeTypeOk(o.PricingPlan); ok { + toSerialize["PricingPlan"] = val + } + if val, ok := getCatalogProductPricingOptionGetRateAttributeTypeOk(o.Rate); ok { + toSerialize["Rate"] = val + } + if val, ok := getCatalogProductPricingOptionGetSkuAttributeTypeOk(o.Sku); ok { + toSerialize["Sku"] = val } - if !IsNil(o.PricingPlan) { - toSerialize["pricingPlan"] = o.PricingPlan + if val, ok := getCatalogProductPricingOptionGetSkuInfoAttributeTypeOk(o.SkuInfo); ok { + toSerialize["SkuInfo"] = val } - if !IsNil(o.Rate) { - toSerialize["rate"] = o.Rate + if val, ok := getCatalogProductPricingOptionGetSkuInfoDetailsAttributeTypeOk(o.SkuInfoDetails); ok { + toSerialize["SkuInfoDetails"] = val } - toSerialize["sku"] = o.Sku - toSerialize["skuInfo"] = o.SkuInfo - toSerialize["skuInfoDetails"] = o.SkuInfoDetails - if !IsNil(o.Unit) { - toSerialize["unit"] = o.Unit + if val, ok := getCatalogProductPricingOptionGetUnitAttributeTypeOk(o.Unit); ok { + toSerialize["Unit"] = val } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_catalog_product_support_resource.go b/services/stackitmarketplace/model_catalog_product_support_resource.go index 69fb7478b..ee4daaa4e 100644 --- a/services/stackitmarketplace/model_catalog_product_support_resource.go +++ b/services/stackitmarketplace/model_catalog_product_support_resource.go @@ -17,12 +17,54 @@ import ( // checks if the CatalogProductSupportResource type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CatalogProductSupportResource{} +/* + types and functions for supportLink +*/ + +// isNotNullableString +type CatalogProductSupportResourceGetSupportLinkAttributeType = *string + +func getCatalogProductSupportResourceGetSupportLinkAttributeTypeOk(arg CatalogProductSupportResourceGetSupportLinkAttributeType) (ret CatalogProductSupportResourceGetSupportLinkRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductSupportResourceGetSupportLinkAttributeType(arg *CatalogProductSupportResourceGetSupportLinkAttributeType, val CatalogProductSupportResourceGetSupportLinkRetType) { + *arg = &val +} + +type CatalogProductSupportResourceGetSupportLinkArgType = string +type CatalogProductSupportResourceGetSupportLinkRetType = string + +/* + types and functions for supportLinkTitle +*/ + +// isNotNullableString +type CatalogProductSupportResourceGetSupportLinkTitleAttributeType = *string + +func getCatalogProductSupportResourceGetSupportLinkTitleAttributeTypeOk(arg CatalogProductSupportResourceGetSupportLinkTitleAttributeType) (ret CatalogProductSupportResourceGetSupportLinkTitleRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductSupportResourceGetSupportLinkTitleAttributeType(arg *CatalogProductSupportResourceGetSupportLinkTitleAttributeType, val CatalogProductSupportResourceGetSupportLinkTitleRetType) { + *arg = &val +} + +type CatalogProductSupportResourceGetSupportLinkTitleArgType = string +type CatalogProductSupportResourceGetSupportLinkTitleRetType = string + // CatalogProductSupportResource struct for CatalogProductSupportResource type CatalogProductSupportResource struct { // The support resource link. - SupportLink *string `json:"supportLink,omitempty"` + SupportLink CatalogProductSupportResourceGetSupportLinkAttributeType `json:"supportLink,omitempty"` // The support resource link title. - SupportLinkTitle *string `json:"supportLinkTitle,omitempty"` + SupportLinkTitle CatalogProductSupportResourceGetSupportLinkTitleAttributeType `json:"supportLinkTitle,omitempty"` } // NewCatalogProductSupportResource instantiates a new CatalogProductSupportResource object @@ -43,76 +85,58 @@ func NewCatalogProductSupportResourceWithDefaults() *CatalogProductSupportResour } // GetSupportLink returns the SupportLink field value if set, zero value otherwise. -func (o *CatalogProductSupportResource) GetSupportLink() *string { - if o == nil || IsNil(o.SupportLink) { - var ret *string - return ret - } - return o.SupportLink +func (o *CatalogProductSupportResource) GetSupportLink() (res CatalogProductSupportResourceGetSupportLinkRetType) { + res, _ = o.GetSupportLinkOk() + return } // GetSupportLinkOk returns a tuple with the SupportLink field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatalogProductSupportResource) GetSupportLinkOk() (*string, bool) { - if o == nil || IsNil(o.SupportLink) { - return nil, false - } - return o.SupportLink, true +func (o *CatalogProductSupportResource) GetSupportLinkOk() (ret CatalogProductSupportResourceGetSupportLinkRetType, ok bool) { + return getCatalogProductSupportResourceGetSupportLinkAttributeTypeOk(o.SupportLink) } // HasSupportLink returns a boolean if a field has been set. func (o *CatalogProductSupportResource) HasSupportLink() bool { - if o != nil && !IsNil(o.SupportLink) { - return true - } - - return false + _, ok := o.GetSupportLinkOk() + return ok } // SetSupportLink gets a reference to the given string and assigns it to the SupportLink field. -func (o *CatalogProductSupportResource) SetSupportLink(v *string) { - o.SupportLink = v +func (o *CatalogProductSupportResource) SetSupportLink(v CatalogProductSupportResourceGetSupportLinkRetType) { + setCatalogProductSupportResourceGetSupportLinkAttributeType(&o.SupportLink, v) } // GetSupportLinkTitle returns the SupportLinkTitle field value if set, zero value otherwise. -func (o *CatalogProductSupportResource) GetSupportLinkTitle() *string { - if o == nil || IsNil(o.SupportLinkTitle) { - var ret *string - return ret - } - return o.SupportLinkTitle +func (o *CatalogProductSupportResource) GetSupportLinkTitle() (res CatalogProductSupportResourceGetSupportLinkTitleRetType) { + res, _ = o.GetSupportLinkTitleOk() + return } // GetSupportLinkTitleOk returns a tuple with the SupportLinkTitle field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatalogProductSupportResource) GetSupportLinkTitleOk() (*string, bool) { - if o == nil || IsNil(o.SupportLinkTitle) { - return nil, false - } - return o.SupportLinkTitle, true +func (o *CatalogProductSupportResource) GetSupportLinkTitleOk() (ret CatalogProductSupportResourceGetSupportLinkTitleRetType, ok bool) { + return getCatalogProductSupportResourceGetSupportLinkTitleAttributeTypeOk(o.SupportLinkTitle) } // HasSupportLinkTitle returns a boolean if a field has been set. func (o *CatalogProductSupportResource) HasSupportLinkTitle() bool { - if o != nil && !IsNil(o.SupportLinkTitle) { - return true - } - - return false + _, ok := o.GetSupportLinkTitleOk() + return ok } // SetSupportLinkTitle gets a reference to the given string and assigns it to the SupportLinkTitle field. -func (o *CatalogProductSupportResource) SetSupportLinkTitle(v *string) { - o.SupportLinkTitle = v +func (o *CatalogProductSupportResource) SetSupportLinkTitle(v CatalogProductSupportResourceGetSupportLinkTitleRetType) { + setCatalogProductSupportResourceGetSupportLinkTitleAttributeType(&o.SupportLinkTitle, v) } func (o CatalogProductSupportResource) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.SupportLink) { - toSerialize["supportLink"] = o.SupportLink + if val, ok := getCatalogProductSupportResourceGetSupportLinkAttributeTypeOk(o.SupportLink); ok { + toSerialize["SupportLink"] = val } - if !IsNil(o.SupportLinkTitle) { - toSerialize["supportLinkTitle"] = o.SupportLinkTitle + if val, ok := getCatalogProductSupportResourceGetSupportLinkTitleAttributeTypeOk(o.SupportLinkTitle); ok { + toSerialize["SupportLinkTitle"] = val } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_catalog_product_vendor_terms.go b/services/stackitmarketplace/model_catalog_product_vendor_terms.go index 8075635d9..c01f80fd8 100644 --- a/services/stackitmarketplace/model_catalog_product_vendor_terms.go +++ b/services/stackitmarketplace/model_catalog_product_vendor_terms.go @@ -17,17 +17,80 @@ import ( // checks if the CatalogProductVendorTerms type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CatalogProductVendorTerms{} +/* + types and functions for description +*/ + +// isNotNullableString +type CatalogProductVendorTermsGetDescriptionAttributeType = *string + +func getCatalogProductVendorTermsGetDescriptionAttributeTypeOk(arg CatalogProductVendorTermsGetDescriptionAttributeType) (ret CatalogProductVendorTermsGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductVendorTermsGetDescriptionAttributeType(arg *CatalogProductVendorTermsGetDescriptionAttributeType, val CatalogProductVendorTermsGetDescriptionRetType) { + *arg = &val +} + +type CatalogProductVendorTermsGetDescriptionArgType = string +type CatalogProductVendorTermsGetDescriptionRetType = string + +/* + types and functions for title +*/ + +// isNotNullableString +type CatalogProductVendorTermsGetTitleAttributeType = *string + +func getCatalogProductVendorTermsGetTitleAttributeTypeOk(arg CatalogProductVendorTermsGetTitleAttributeType) (ret CatalogProductVendorTermsGetTitleRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductVendorTermsGetTitleAttributeType(arg *CatalogProductVendorTermsGetTitleAttributeType, val CatalogProductVendorTermsGetTitleRetType) { + *arg = &val +} + +type CatalogProductVendorTermsGetTitleArgType = string +type CatalogProductVendorTermsGetTitleRetType = string + +/* + types and functions for url +*/ + +// isNotNullableString +type CatalogProductVendorTermsGetUrlAttributeType = *string + +func getCatalogProductVendorTermsGetUrlAttributeTypeOk(arg CatalogProductVendorTermsGetUrlAttributeType) (ret CatalogProductVendorTermsGetUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductVendorTermsGetUrlAttributeType(arg *CatalogProductVendorTermsGetUrlAttributeType, val CatalogProductVendorTermsGetUrlRetType) { + *arg = &val +} + +type CatalogProductVendorTermsGetUrlArgType = string +type CatalogProductVendorTermsGetUrlRetType = string + // CatalogProductVendorTerms struct for CatalogProductVendorTerms type CatalogProductVendorTerms struct { // The terms of use description. // REQUIRED - Description *string `json:"description"` + Description CatalogProductVendorTermsGetDescriptionAttributeType `json:"description"` // The terms of use title. // REQUIRED - Title *string `json:"title"` + Title CatalogProductVendorTermsGetTitleAttributeType `json:"title"` // The terms of use url. // REQUIRED - Url *string `json:"url"` + Url CatalogProductVendorTermsGetUrlAttributeType `json:"url"` } type _CatalogProductVendorTerms CatalogProductVendorTerms @@ -36,11 +99,11 @@ type _CatalogProductVendorTerms CatalogProductVendorTerms // 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 NewCatalogProductVendorTerms(description *string, title *string, url *string) *CatalogProductVendorTerms { +func NewCatalogProductVendorTerms(description CatalogProductVendorTermsGetDescriptionArgType, title CatalogProductVendorTermsGetTitleArgType, url CatalogProductVendorTermsGetUrlArgType) *CatalogProductVendorTerms { this := CatalogProductVendorTerms{} - this.Description = description - this.Title = title - this.Url = url + setCatalogProductVendorTermsGetDescriptionAttributeType(&this.Description, description) + setCatalogProductVendorTermsGetTitleAttributeType(&this.Title, title) + setCatalogProductVendorTermsGetUrlAttributeType(&this.Url, url) return &this } @@ -53,82 +116,67 @@ func NewCatalogProductVendorTermsWithDefaults() *CatalogProductVendorTerms { } // GetDescription returns the Description field value -func (o *CatalogProductVendorTerms) GetDescription() *string { - if o == nil || IsNil(o.Description) { - var ret *string - return ret - } - - return o.Description +func (o *CatalogProductVendorTerms) GetDescription() (ret CatalogProductVendorTermsGetDescriptionRetType) { + ret, _ = o.GetDescriptionOk() + return ret } // GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. -func (o *CatalogProductVendorTerms) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Description, true +func (o *CatalogProductVendorTerms) GetDescriptionOk() (ret CatalogProductVendorTermsGetDescriptionRetType, ok bool) { + return getCatalogProductVendorTermsGetDescriptionAttributeTypeOk(o.Description) } // SetDescription sets field value -func (o *CatalogProductVendorTerms) SetDescription(v *string) { - o.Description = v +func (o *CatalogProductVendorTerms) SetDescription(v CatalogProductVendorTermsGetDescriptionRetType) { + setCatalogProductVendorTermsGetDescriptionAttributeType(&o.Description, v) } // GetTitle returns the Title field value -func (o *CatalogProductVendorTerms) GetTitle() *string { - if o == nil || IsNil(o.Title) { - var ret *string - return ret - } - - return o.Title +func (o *CatalogProductVendorTerms) GetTitle() (ret CatalogProductVendorTermsGetTitleRetType) { + ret, _ = o.GetTitleOk() + return ret } // GetTitleOk returns a tuple with the Title field value // and a boolean to check if the value has been set. -func (o *CatalogProductVendorTerms) GetTitleOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Title, true +func (o *CatalogProductVendorTerms) GetTitleOk() (ret CatalogProductVendorTermsGetTitleRetType, ok bool) { + return getCatalogProductVendorTermsGetTitleAttributeTypeOk(o.Title) } // SetTitle sets field value -func (o *CatalogProductVendorTerms) SetTitle(v *string) { - o.Title = v +func (o *CatalogProductVendorTerms) SetTitle(v CatalogProductVendorTermsGetTitleRetType) { + setCatalogProductVendorTermsGetTitleAttributeType(&o.Title, v) } // GetUrl returns the Url field value -func (o *CatalogProductVendorTerms) GetUrl() *string { - if o == nil || IsNil(o.Url) { - var ret *string - return ret - } - - return o.Url +func (o *CatalogProductVendorTerms) GetUrl() (ret CatalogProductVendorTermsGetUrlRetType) { + ret, _ = o.GetUrlOk() + return ret } // GetUrlOk returns a tuple with the Url field value // and a boolean to check if the value has been set. -func (o *CatalogProductVendorTerms) GetUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Url, true +func (o *CatalogProductVendorTerms) GetUrlOk() (ret CatalogProductVendorTermsGetUrlRetType, ok bool) { + return getCatalogProductVendorTermsGetUrlAttributeTypeOk(o.Url) } // SetUrl sets field value -func (o *CatalogProductVendorTerms) SetUrl(v *string) { - o.Url = v +func (o *CatalogProductVendorTerms) SetUrl(v CatalogProductVendorTermsGetUrlRetType) { + setCatalogProductVendorTermsGetUrlAttributeType(&o.Url, v) } func (o CatalogProductVendorTerms) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["description"] = o.Description - toSerialize["title"] = o.Title - toSerialize["url"] = o.Url + if val, ok := getCatalogProductVendorTermsGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getCatalogProductVendorTermsGetTitleAttributeTypeOk(o.Title); ok { + toSerialize["Title"] = val + } + if val, ok := getCatalogProductVendorTermsGetUrlAttributeTypeOk(o.Url); ok { + toSerialize["Url"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_contact_sales.go b/services/stackitmarketplace/model_contact_sales.go index 78be1ff66..e4e2fd7e1 100644 --- a/services/stackitmarketplace/model_contact_sales.go +++ b/services/stackitmarketplace/model_contact_sales.go @@ -17,13 +17,53 @@ import ( // checks if the ContactSales type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ContactSales{} +/* + types and functions for contactSales +*/ + +// isModel +type ContactSalesGetContactSalesAttributeType = *ContactSalesContactSales +type ContactSalesGetContactSalesArgType = ContactSalesContactSales +type ContactSalesGetContactSalesRetType = ContactSalesContactSales + +func getContactSalesGetContactSalesAttributeTypeOk(arg ContactSalesGetContactSalesAttributeType) (ret ContactSalesGetContactSalesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setContactSalesGetContactSalesAttributeType(arg *ContactSalesGetContactSalesAttributeType, val ContactSalesGetContactSalesRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isEnumRef +type ContactSalesGetTypeAttributeType = *string +type ContactSalesGetTypeArgType = string +type ContactSalesGetTypeRetType = string + +func getContactSalesGetTypeAttributeTypeOk(arg ContactSalesGetTypeAttributeType) (ret ContactSalesGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setContactSalesGetTypeAttributeType(arg *ContactSalesGetTypeAttributeType, val ContactSalesGetTypeRetType) { + *arg = &val +} + // ContactSales Contact sales. type ContactSales struct { // REQUIRED - ContactSales *ContactSalesContactSales `json:"contactSales"` + ContactSales ContactSalesGetContactSalesAttributeType `json:"contactSales"` // The form type. // REQUIRED - Type *string `json:"type"` + Type ContactSalesGetTypeAttributeType `json:"type"` } type _ContactSales ContactSales @@ -32,10 +72,10 @@ type _ContactSales ContactSales // 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 NewContactSales(contactSales *ContactSalesContactSales, type_ *string) *ContactSales { +func NewContactSales(contactSales ContactSalesGetContactSalesArgType, type_ ContactSalesGetTypeArgType) *ContactSales { this := ContactSales{} - this.ContactSales = contactSales - this.Type = type_ + setContactSalesGetContactSalesAttributeType(&this.ContactSales, contactSales) + setContactSalesGetTypeAttributeType(&this.Type, type_) return &this } @@ -48,57 +88,47 @@ func NewContactSalesWithDefaults() *ContactSales { } // GetContactSales returns the ContactSales field value -func (o *ContactSales) GetContactSales() *ContactSalesContactSales { - if o == nil || IsNil(o.ContactSales) { - var ret *ContactSalesContactSales - return ret - } - - return o.ContactSales +func (o *ContactSales) GetContactSales() (ret ContactSalesGetContactSalesRetType) { + ret, _ = o.GetContactSalesOk() + return ret } // GetContactSalesOk returns a tuple with the ContactSales field value // and a boolean to check if the value has been set. -func (o *ContactSales) GetContactSalesOk() (*ContactSalesContactSales, bool) { - if o == nil { - return nil, false - } - return o.ContactSales, true +func (o *ContactSales) GetContactSalesOk() (ret ContactSalesGetContactSalesRetType, ok bool) { + return getContactSalesGetContactSalesAttributeTypeOk(o.ContactSales) } // SetContactSales sets field value -func (o *ContactSales) SetContactSales(v *ContactSalesContactSales) { - o.ContactSales = v +func (o *ContactSales) SetContactSales(v ContactSalesGetContactSalesRetType) { + setContactSalesGetContactSalesAttributeType(&o.ContactSales, v) } // GetType returns the Type field value -func (o *ContactSales) GetType() *string { - if o == nil || IsNil(o.Type) { - var ret *string - return ret - } - - return o.Type +func (o *ContactSales) GetType() (ret ContactSalesGetTypeRetType) { + 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 *ContactSales) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Type, true +func (o *ContactSales) GetTypeOk() (ret ContactSalesGetTypeRetType, ok bool) { + return getContactSalesGetTypeAttributeTypeOk(o.Type) } // SetType sets field value -func (o *ContactSales) SetType(v *string) { - o.Type = v +func (o *ContactSales) SetType(v ContactSalesGetTypeRetType) { + setContactSalesGetTypeAttributeType(&o.Type, v) } func (o ContactSales) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["contactSales"] = o.ContactSales - toSerialize["type"] = o.Type + if val, ok := getContactSalesGetContactSalesAttributeTypeOk(o.ContactSales); ok { + toSerialize["ContactSales"] = val + } + if val, ok := getContactSalesGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_contact_sales_contact_sales.go b/services/stackitmarketplace/model_contact_sales_contact_sales.go index 90cf7e87c..d28265a95 100644 --- a/services/stackitmarketplace/model_contact_sales_contact_sales.go +++ b/services/stackitmarketplace/model_contact_sales_contact_sales.go @@ -17,23 +17,128 @@ import ( // checks if the ContactSalesContactSales type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ContactSalesContactSales{} +/* + types and functions for companyName +*/ + +// isNotNullableString +type ContactSalesContactSalesGetCompanyNameAttributeType = *string + +func getContactSalesContactSalesGetCompanyNameAttributeTypeOk(arg ContactSalesContactSalesGetCompanyNameAttributeType) (ret ContactSalesContactSalesGetCompanyNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setContactSalesContactSalesGetCompanyNameAttributeType(arg *ContactSalesContactSalesGetCompanyNameAttributeType, val ContactSalesContactSalesGetCompanyNameRetType) { + *arg = &val +} + +type ContactSalesContactSalesGetCompanyNameArgType = string +type ContactSalesContactSalesGetCompanyNameRetType = string + +/* + types and functions for contactEmail +*/ + +// isNotNullableString +type ContactSalesContactSalesGetContactEmailAttributeType = *string + +func getContactSalesContactSalesGetContactEmailAttributeTypeOk(arg ContactSalesContactSalesGetContactEmailAttributeType) (ret ContactSalesContactSalesGetContactEmailRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setContactSalesContactSalesGetContactEmailAttributeType(arg *ContactSalesContactSalesGetContactEmailAttributeType, val ContactSalesContactSalesGetContactEmailRetType) { + *arg = &val +} + +type ContactSalesContactSalesGetContactEmailArgType = string +type ContactSalesContactSalesGetContactEmailRetType = string + +/* + types and functions for fullName +*/ + +// isNotNullableString +type ContactSalesContactSalesGetFullNameAttributeType = *string + +func getContactSalesContactSalesGetFullNameAttributeTypeOk(arg ContactSalesContactSalesGetFullNameAttributeType) (ret ContactSalesContactSalesGetFullNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setContactSalesContactSalesGetFullNameAttributeType(arg *ContactSalesContactSalesGetFullNameAttributeType, val ContactSalesContactSalesGetFullNameRetType) { + *arg = &val +} + +type ContactSalesContactSalesGetFullNameArgType = string +type ContactSalesContactSalesGetFullNameRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +type ContactSalesContactSalesGetMessageAttributeType = *string + +func getContactSalesContactSalesGetMessageAttributeTypeOk(arg ContactSalesContactSalesGetMessageAttributeType) (ret ContactSalesContactSalesGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setContactSalesContactSalesGetMessageAttributeType(arg *ContactSalesContactSalesGetMessageAttributeType, val ContactSalesContactSalesGetMessageRetType) { + *arg = &val +} + +type ContactSalesContactSalesGetMessageArgType = string +type ContactSalesContactSalesGetMessageRetType = string + +/* + types and functions for productId +*/ + +// isNotNullableString +type ContactSalesContactSalesGetProductIdAttributeType = *string + +func getContactSalesContactSalesGetProductIdAttributeTypeOk(arg ContactSalesContactSalesGetProductIdAttributeType) (ret ContactSalesContactSalesGetProductIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setContactSalesContactSalesGetProductIdAttributeType(arg *ContactSalesContactSalesGetProductIdAttributeType, val ContactSalesContactSalesGetProductIdRetType) { + *arg = &val +} + +type ContactSalesContactSalesGetProductIdArgType = string +type ContactSalesContactSalesGetProductIdRetType = string + // ContactSalesContactSales struct for ContactSalesContactSales type ContactSalesContactSales struct { // The company name. // REQUIRED - CompanyName *string `json:"companyName"` + CompanyName ContactSalesContactSalesGetCompanyNameAttributeType `json:"companyName"` // The contact e-mail address. // REQUIRED - ContactEmail *string `json:"contactEmail"` + ContactEmail ContactSalesContactSalesGetContactEmailAttributeType `json:"contactEmail"` // The full name of the contact person. // REQUIRED - FullName *string `json:"fullName"` + FullName ContactSalesContactSalesGetFullNameAttributeType `json:"fullName"` // The message content. // REQUIRED - Message *string `json:"message"` + Message ContactSalesContactSalesGetMessageAttributeType `json:"message"` // The product ID. // REQUIRED - ProductId *string `json:"productId"` + ProductId ContactSalesContactSalesGetProductIdAttributeType `json:"productId"` } type _ContactSalesContactSales ContactSalesContactSales @@ -42,13 +147,13 @@ type _ContactSalesContactSales ContactSalesContactSales // 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 NewContactSalesContactSales(companyName *string, contactEmail *string, fullName *string, message *string, productId *string) *ContactSalesContactSales { +func NewContactSalesContactSales(companyName ContactSalesContactSalesGetCompanyNameArgType, contactEmail ContactSalesContactSalesGetContactEmailArgType, fullName ContactSalesContactSalesGetFullNameArgType, message ContactSalesContactSalesGetMessageArgType, productId ContactSalesContactSalesGetProductIdArgType) *ContactSalesContactSales { this := ContactSalesContactSales{} - this.CompanyName = companyName - this.ContactEmail = contactEmail - this.FullName = fullName - this.Message = message - this.ProductId = productId + setContactSalesContactSalesGetCompanyNameAttributeType(&this.CompanyName, companyName) + setContactSalesContactSalesGetContactEmailAttributeType(&this.ContactEmail, contactEmail) + setContactSalesContactSalesGetFullNameAttributeType(&this.FullName, fullName) + setContactSalesContactSalesGetMessageAttributeType(&this.Message, message) + setContactSalesContactSalesGetProductIdAttributeType(&this.ProductId, productId) return &this } @@ -61,132 +166,107 @@ func NewContactSalesContactSalesWithDefaults() *ContactSalesContactSales { } // GetCompanyName returns the CompanyName field value -func (o *ContactSalesContactSales) GetCompanyName() *string { - if o == nil || IsNil(o.CompanyName) { - var ret *string - return ret - } - - return o.CompanyName +func (o *ContactSalesContactSales) GetCompanyName() (ret ContactSalesContactSalesGetCompanyNameRetType) { + 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 *ContactSalesContactSales) GetCompanyNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CompanyName, true +func (o *ContactSalesContactSales) GetCompanyNameOk() (ret ContactSalesContactSalesGetCompanyNameRetType, ok bool) { + return getContactSalesContactSalesGetCompanyNameAttributeTypeOk(o.CompanyName) } // SetCompanyName sets field value -func (o *ContactSalesContactSales) SetCompanyName(v *string) { - o.CompanyName = v +func (o *ContactSalesContactSales) SetCompanyName(v ContactSalesContactSalesGetCompanyNameRetType) { + setContactSalesContactSalesGetCompanyNameAttributeType(&o.CompanyName, v) } // GetContactEmail returns the ContactEmail field value -func (o *ContactSalesContactSales) GetContactEmail() *string { - if o == nil || IsNil(o.ContactEmail) { - var ret *string - return ret - } - - return o.ContactEmail +func (o *ContactSalesContactSales) GetContactEmail() (ret ContactSalesContactSalesGetContactEmailRetType) { + 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 *ContactSalesContactSales) GetContactEmailOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ContactEmail, true +func (o *ContactSalesContactSales) GetContactEmailOk() (ret ContactSalesContactSalesGetContactEmailRetType, ok bool) { + return getContactSalesContactSalesGetContactEmailAttributeTypeOk(o.ContactEmail) } // SetContactEmail sets field value -func (o *ContactSalesContactSales) SetContactEmail(v *string) { - o.ContactEmail = v +func (o *ContactSalesContactSales) SetContactEmail(v ContactSalesContactSalesGetContactEmailRetType) { + setContactSalesContactSalesGetContactEmailAttributeType(&o.ContactEmail, v) } // GetFullName returns the FullName field value -func (o *ContactSalesContactSales) GetFullName() *string { - if o == nil || IsNil(o.FullName) { - var ret *string - return ret - } - - return o.FullName +func (o *ContactSalesContactSales) GetFullName() (ret ContactSalesContactSalesGetFullNameRetType) { + 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 *ContactSalesContactSales) GetFullNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.FullName, true +func (o *ContactSalesContactSales) GetFullNameOk() (ret ContactSalesContactSalesGetFullNameRetType, ok bool) { + return getContactSalesContactSalesGetFullNameAttributeTypeOk(o.FullName) } // SetFullName sets field value -func (o *ContactSalesContactSales) SetFullName(v *string) { - o.FullName = v +func (o *ContactSalesContactSales) SetFullName(v ContactSalesContactSalesGetFullNameRetType) { + setContactSalesContactSalesGetFullNameAttributeType(&o.FullName, v) } // GetMessage returns the Message field value -func (o *ContactSalesContactSales) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *ContactSalesContactSales) GetMessage() (ret ContactSalesContactSalesGetMessageRetType) { + 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 *ContactSalesContactSales) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Message, true +func (o *ContactSalesContactSales) GetMessageOk() (ret ContactSalesContactSalesGetMessageRetType, ok bool) { + return getContactSalesContactSalesGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *ContactSalesContactSales) SetMessage(v *string) { - o.Message = v +func (o *ContactSalesContactSales) SetMessage(v ContactSalesContactSalesGetMessageRetType) { + setContactSalesContactSalesGetMessageAttributeType(&o.Message, v) } // GetProductId returns the ProductId field value -func (o *ContactSalesContactSales) GetProductId() *string { - if o == nil || IsNil(o.ProductId) { - var ret *string - return ret - } - - return o.ProductId +func (o *ContactSalesContactSales) GetProductId() (ret ContactSalesContactSalesGetProductIdRetType) { + 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 *ContactSalesContactSales) GetProductIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ProductId, true +func (o *ContactSalesContactSales) GetProductIdOk() (ret ContactSalesContactSalesGetProductIdRetType, ok bool) { + return getContactSalesContactSalesGetProductIdAttributeTypeOk(o.ProductId) } // SetProductId sets field value -func (o *ContactSalesContactSales) SetProductId(v *string) { - o.ProductId = v +func (o *ContactSalesContactSales) SetProductId(v ContactSalesContactSalesGetProductIdRetType) { + setContactSalesContactSalesGetProductIdAttributeType(&o.ProductId, v) } func (o ContactSalesContactSales) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["companyName"] = o.CompanyName - toSerialize["contactEmail"] = o.ContactEmail - toSerialize["fullName"] = o.FullName - toSerialize["message"] = o.Message - toSerialize["productId"] = o.ProductId + if val, ok := getContactSalesContactSalesGetCompanyNameAttributeTypeOk(o.CompanyName); ok { + toSerialize["CompanyName"] = val + } + if val, ok := getContactSalesContactSalesGetContactEmailAttributeTypeOk(o.ContactEmail); ok { + toSerialize["ContactEmail"] = val + } + if val, ok := getContactSalesContactSalesGetFullNameAttributeTypeOk(o.FullName); ok { + toSerialize["FullName"] = val + } + if val, ok := getContactSalesContactSalesGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + if val, ok := getContactSalesContactSalesGetProductIdAttributeTypeOk(o.ProductId); ok { + toSerialize["ProductId"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_current_subscription_state_response.go b/services/stackitmarketplace/model_current_subscription_state_response.go index 14d00e5e5..b641736cc 100644 --- a/services/stackitmarketplace/model_current_subscription_state_response.go +++ b/services/stackitmarketplace/model_current_subscription_state_response.go @@ -17,14 +17,55 @@ import ( // checks if the CurrentSubscriptionStateResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CurrentSubscriptionStateResponse{} +/* + types and functions for lifecycleState +*/ + +// isEnumRef +type CurrentSubscriptionStateResponseGetLifecycleStateAttributeType = *string +type CurrentSubscriptionStateResponseGetLifecycleStateArgType = string +type CurrentSubscriptionStateResponseGetLifecycleStateRetType = string + +func getCurrentSubscriptionStateResponseGetLifecycleStateAttributeTypeOk(arg CurrentSubscriptionStateResponseGetLifecycleStateAttributeType) (ret CurrentSubscriptionStateResponseGetLifecycleStateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCurrentSubscriptionStateResponseGetLifecycleStateAttributeType(arg *CurrentSubscriptionStateResponseGetLifecycleStateAttributeType, val CurrentSubscriptionStateResponseGetLifecycleStateRetType) { + *arg = &val +} + +/* + types and functions for subscriptionId +*/ + +// isNotNullableString +type CurrentSubscriptionStateResponseGetSubscriptionIdAttributeType = *string + +func getCurrentSubscriptionStateResponseGetSubscriptionIdAttributeTypeOk(arg CurrentSubscriptionStateResponseGetSubscriptionIdAttributeType) (ret CurrentSubscriptionStateResponseGetSubscriptionIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCurrentSubscriptionStateResponseGetSubscriptionIdAttributeType(arg *CurrentSubscriptionStateResponseGetSubscriptionIdAttributeType, val CurrentSubscriptionStateResponseGetSubscriptionIdRetType) { + *arg = &val +} + +type CurrentSubscriptionStateResponseGetSubscriptionIdArgType = string +type CurrentSubscriptionStateResponseGetSubscriptionIdRetType = string + // CurrentSubscriptionStateResponse struct for CurrentSubscriptionStateResponse type CurrentSubscriptionStateResponse struct { // Lifecycle state of the subscription. // REQUIRED - LifecycleState *string `json:"lifecycleState"` + LifecycleState CurrentSubscriptionStateResponseGetLifecycleStateAttributeType `json:"lifecycleState"` // The subscription ID. // REQUIRED - SubscriptionId *string `json:"subscriptionId"` + SubscriptionId CurrentSubscriptionStateResponseGetSubscriptionIdAttributeType `json:"subscriptionId"` } type _CurrentSubscriptionStateResponse CurrentSubscriptionStateResponse @@ -33,10 +74,10 @@ type _CurrentSubscriptionStateResponse CurrentSubscriptionStateResponse // 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 NewCurrentSubscriptionStateResponse(lifecycleState *string, subscriptionId *string) *CurrentSubscriptionStateResponse { +func NewCurrentSubscriptionStateResponse(lifecycleState CurrentSubscriptionStateResponseGetLifecycleStateArgType, subscriptionId CurrentSubscriptionStateResponseGetSubscriptionIdArgType) *CurrentSubscriptionStateResponse { this := CurrentSubscriptionStateResponse{} - this.LifecycleState = lifecycleState - this.SubscriptionId = subscriptionId + setCurrentSubscriptionStateResponseGetLifecycleStateAttributeType(&this.LifecycleState, lifecycleState) + setCurrentSubscriptionStateResponseGetSubscriptionIdAttributeType(&this.SubscriptionId, subscriptionId) return &this } @@ -49,57 +90,47 @@ func NewCurrentSubscriptionStateResponseWithDefaults() *CurrentSubscriptionState } // GetLifecycleState returns the LifecycleState field value -func (o *CurrentSubscriptionStateResponse) GetLifecycleState() *string { - if o == nil || IsNil(o.LifecycleState) { - var ret *string - return ret - } - - return o.LifecycleState +func (o *CurrentSubscriptionStateResponse) GetLifecycleState() (ret CurrentSubscriptionStateResponseGetLifecycleStateRetType) { + ret, _ = o.GetLifecycleStateOk() + return ret } // GetLifecycleStateOk returns a tuple with the LifecycleState field value // and a boolean to check if the value has been set. -func (o *CurrentSubscriptionStateResponse) GetLifecycleStateOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.LifecycleState, true +func (o *CurrentSubscriptionStateResponse) GetLifecycleStateOk() (ret CurrentSubscriptionStateResponseGetLifecycleStateRetType, ok bool) { + return getCurrentSubscriptionStateResponseGetLifecycleStateAttributeTypeOk(o.LifecycleState) } // SetLifecycleState sets field value -func (o *CurrentSubscriptionStateResponse) SetLifecycleState(v *string) { - o.LifecycleState = v +func (o *CurrentSubscriptionStateResponse) SetLifecycleState(v CurrentSubscriptionStateResponseGetLifecycleStateRetType) { + setCurrentSubscriptionStateResponseGetLifecycleStateAttributeType(&o.LifecycleState, v) } // GetSubscriptionId returns the SubscriptionId field value -func (o *CurrentSubscriptionStateResponse) GetSubscriptionId() *string { - if o == nil || IsNil(o.SubscriptionId) { - var ret *string - return ret - } - - return o.SubscriptionId +func (o *CurrentSubscriptionStateResponse) GetSubscriptionId() (ret CurrentSubscriptionStateResponseGetSubscriptionIdRetType) { + ret, _ = o.GetSubscriptionIdOk() + return ret } // GetSubscriptionIdOk returns a tuple with the SubscriptionId field value // and a boolean to check if the value has been set. -func (o *CurrentSubscriptionStateResponse) GetSubscriptionIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.SubscriptionId, true +func (o *CurrentSubscriptionStateResponse) GetSubscriptionIdOk() (ret CurrentSubscriptionStateResponseGetSubscriptionIdRetType, ok bool) { + return getCurrentSubscriptionStateResponseGetSubscriptionIdAttributeTypeOk(o.SubscriptionId) } // SetSubscriptionId sets field value -func (o *CurrentSubscriptionStateResponse) SetSubscriptionId(v *string) { - o.SubscriptionId = v +func (o *CurrentSubscriptionStateResponse) SetSubscriptionId(v CurrentSubscriptionStateResponseGetSubscriptionIdRetType) { + setCurrentSubscriptionStateResponseGetSubscriptionIdAttributeType(&o.SubscriptionId, v) } func (o CurrentSubscriptionStateResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["lifecycleState"] = o.LifecycleState - toSerialize["subscriptionId"] = o.SubscriptionId + if val, ok := getCurrentSubscriptionStateResponseGetLifecycleStateAttributeTypeOk(o.LifecycleState); ok { + toSerialize["LifecycleState"] = val + } + if val, ok := getCurrentSubscriptionStateResponseGetSubscriptionIdAttributeTypeOk(o.SubscriptionId); ok { + toSerialize["SubscriptionId"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_error_response.go b/services/stackitmarketplace/model_error_response.go index edf67053e..58c9a9dae 100644 --- a/services/stackitmarketplace/model_error_response.go +++ b/services/stackitmarketplace/model_error_response.go @@ -18,24 +18,127 @@ import ( // checks if the ErrorResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ErrorResponse{} +/* + types and functions for error +*/ + +// isNotNullableString +type ErrorResponseGetErrorAttributeType = *string + +func getErrorResponseGetErrorAttributeTypeOk(arg ErrorResponseGetErrorAttributeType) (ret ErrorResponseGetErrorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setErrorResponseGetErrorAttributeType(arg *ErrorResponseGetErrorAttributeType, val ErrorResponseGetErrorRetType) { + *arg = &val +} + +type ErrorResponseGetErrorArgType = string +type ErrorResponseGetErrorRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +type ErrorResponseGetMessageAttributeType = *string + +func getErrorResponseGetMessageAttributeTypeOk(arg ErrorResponseGetMessageAttributeType) (ret ErrorResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setErrorResponseGetMessageAttributeType(arg *ErrorResponseGetMessageAttributeType, val ErrorResponseGetMessageRetType) { + *arg = &val +} + +type ErrorResponseGetMessageArgType = string +type ErrorResponseGetMessageRetType = string + +/* + types and functions for path +*/ + +// isNotNullableString +type ErrorResponseGetPathAttributeType = *string + +func getErrorResponseGetPathAttributeTypeOk(arg ErrorResponseGetPathAttributeType) (ret ErrorResponseGetPathRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setErrorResponseGetPathAttributeType(arg *ErrorResponseGetPathAttributeType, val ErrorResponseGetPathRetType) { + *arg = &val +} + +type ErrorResponseGetPathArgType = string +type ErrorResponseGetPathRetType = string + +/* + types and functions for status +*/ + +// isInteger +type ErrorResponseGetStatusAttributeType = *int64 +type ErrorResponseGetStatusArgType = int64 +type ErrorResponseGetStatusRetType = int64 + +func getErrorResponseGetStatusAttributeTypeOk(arg ErrorResponseGetStatusAttributeType) (ret ErrorResponseGetStatusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setErrorResponseGetStatusAttributeType(arg *ErrorResponseGetStatusAttributeType, val ErrorResponseGetStatusRetType) { + *arg = &val +} + +/* + types and functions for timeStamp +*/ + +// isDateTime +type ErrorResponseGetTimeStampAttributeType = *time.Time +type ErrorResponseGetTimeStampArgType = time.Time +type ErrorResponseGetTimeStampRetType = time.Time + +func getErrorResponseGetTimeStampAttributeTypeOk(arg ErrorResponseGetTimeStampAttributeType) (ret ErrorResponseGetTimeStampRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setErrorResponseGetTimeStampAttributeType(arg *ErrorResponseGetTimeStampAttributeType, val ErrorResponseGetTimeStampRetType) { + *arg = &val +} + // ErrorResponse struct for ErrorResponse type ErrorResponse struct { // Reason phrase of the status code. // REQUIRED - Error *string `json:"error"` + Error ErrorResponseGetErrorAttributeType `json:"error"` // Description of the error. // REQUIRED - Message *string `json:"message"` + Message ErrorResponseGetMessageAttributeType `json:"message"` // Path which was called. // REQUIRED - Path *string `json:"path"` + Path ErrorResponseGetPathAttributeType `json:"path"` // HTTP response status code. // Can be cast to int32 without loss of precision. // REQUIRED - Status *int64 `json:"status"` + Status ErrorResponseGetStatusAttributeType `json:"status"` // Timestamp at which the error occurred. // REQUIRED - TimeStamp *time.Time `json:"timeStamp"` + TimeStamp ErrorResponseGetTimeStampAttributeType `json:"timeStamp"` } type _ErrorResponse ErrorResponse @@ -44,13 +147,13 @@ type _ErrorResponse ErrorResponse // 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 NewErrorResponse(error_ *string, message *string, path *string, status *int64, timeStamp *time.Time) *ErrorResponse { +func NewErrorResponse(error_ ErrorResponseGetErrorArgType, message ErrorResponseGetMessageArgType, path ErrorResponseGetPathArgType, status ErrorResponseGetStatusArgType, timeStamp ErrorResponseGetTimeStampArgType) *ErrorResponse { this := ErrorResponse{} - this.Error = error_ - this.Message = message - this.Path = path - this.Status = status - this.TimeStamp = timeStamp + setErrorResponseGetErrorAttributeType(&this.Error, error_) + setErrorResponseGetMessageAttributeType(&this.Message, message) + setErrorResponseGetPathAttributeType(&this.Path, path) + setErrorResponseGetStatusAttributeType(&this.Status, status) + setErrorResponseGetTimeStampAttributeType(&this.TimeStamp, timeStamp) return &this } @@ -63,132 +166,107 @@ func NewErrorResponseWithDefaults() *ErrorResponse { } // GetError returns the Error field value -func (o *ErrorResponse) GetError() *string { - if o == nil || IsNil(o.Error) { - var ret *string - return ret - } - - return o.Error +func (o *ErrorResponse) GetError() (ret ErrorResponseGetErrorRetType) { + ret, _ = o.GetErrorOk() + return ret } // GetErrorOk returns a tuple with the Error field value // and a boolean to check if the value has been set. -func (o *ErrorResponse) GetErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Error, true +func (o *ErrorResponse) GetErrorOk() (ret ErrorResponseGetErrorRetType, ok bool) { + return getErrorResponseGetErrorAttributeTypeOk(o.Error) } // SetError sets field value -func (o *ErrorResponse) SetError(v *string) { - o.Error = v +func (o *ErrorResponse) SetError(v ErrorResponseGetErrorRetType) { + setErrorResponseGetErrorAttributeType(&o.Error, v) } // GetMessage returns the Message field value -func (o *ErrorResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *ErrorResponse) GetMessage() (ret ErrorResponseGetMessageRetType) { + 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 *ErrorResponse) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Message, true +func (o *ErrorResponse) GetMessageOk() (ret ErrorResponseGetMessageRetType, ok bool) { + return getErrorResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *ErrorResponse) SetMessage(v *string) { - o.Message = v +func (o *ErrorResponse) SetMessage(v ErrorResponseGetMessageRetType) { + setErrorResponseGetMessageAttributeType(&o.Message, v) } // GetPath returns the Path field value -func (o *ErrorResponse) GetPath() *string { - if o == nil || IsNil(o.Path) { - var ret *string - return ret - } - - return o.Path +func (o *ErrorResponse) GetPath() (ret ErrorResponseGetPathRetType) { + ret, _ = o.GetPathOk() + return ret } // GetPathOk returns a tuple with the Path field value // and a boolean to check if the value has been set. -func (o *ErrorResponse) GetPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Path, true +func (o *ErrorResponse) GetPathOk() (ret ErrorResponseGetPathRetType, ok bool) { + return getErrorResponseGetPathAttributeTypeOk(o.Path) } // SetPath sets field value -func (o *ErrorResponse) SetPath(v *string) { - o.Path = v +func (o *ErrorResponse) SetPath(v ErrorResponseGetPathRetType) { + setErrorResponseGetPathAttributeType(&o.Path, v) } // GetStatus returns the Status field value -func (o *ErrorResponse) GetStatus() *int64 { - if o == nil || IsNil(o.Status) { - var ret *int64 - return ret - } - - return o.Status +func (o *ErrorResponse) GetStatus() (ret ErrorResponseGetStatusRetType) { + ret, _ = o.GetStatusOk() + return ret } // GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. -func (o *ErrorResponse) GetStatusOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.Status, true +func (o *ErrorResponse) GetStatusOk() (ret ErrorResponseGetStatusRetType, ok bool) { + return getErrorResponseGetStatusAttributeTypeOk(o.Status) } // SetStatus sets field value -func (o *ErrorResponse) SetStatus(v *int64) { - o.Status = v +func (o *ErrorResponse) SetStatus(v ErrorResponseGetStatusRetType) { + setErrorResponseGetStatusAttributeType(&o.Status, v) } // GetTimeStamp returns the TimeStamp field value -func (o *ErrorResponse) GetTimeStamp() *time.Time { - if o == nil || IsNil(o.TimeStamp) { - var ret *time.Time - return ret - } - - return o.TimeStamp +func (o *ErrorResponse) GetTimeStamp() (ret ErrorResponseGetTimeStampRetType) { + ret, _ = o.GetTimeStampOk() + return ret } // GetTimeStampOk returns a tuple with the TimeStamp field value // and a boolean to check if the value has been set. -func (o *ErrorResponse) GetTimeStampOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.TimeStamp, true +func (o *ErrorResponse) GetTimeStampOk() (ret ErrorResponseGetTimeStampRetType, ok bool) { + return getErrorResponseGetTimeStampAttributeTypeOk(o.TimeStamp) } // SetTimeStamp sets field value -func (o *ErrorResponse) SetTimeStamp(v *time.Time) { - o.TimeStamp = v +func (o *ErrorResponse) SetTimeStamp(v ErrorResponseGetTimeStampRetType) { + setErrorResponseGetTimeStampAttributeType(&o.TimeStamp, v) } func (o ErrorResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["error"] = o.Error - toSerialize["message"] = o.Message - toSerialize["path"] = o.Path - toSerialize["status"] = o.Status - toSerialize["timeStamp"] = o.TimeStamp + if val, ok := getErrorResponseGetErrorAttributeTypeOk(o.Error); ok { + toSerialize["Error"] = val + } + if val, ok := getErrorResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + if val, ok := getErrorResponseGetPathAttributeTypeOk(o.Path); ok { + toSerialize["Path"] = val + } + if val, ok := getErrorResponseGetStatusAttributeTypeOk(o.Status); ok { + toSerialize["Status"] = val + } + if val, ok := getErrorResponseGetTimeStampAttributeTypeOk(o.TimeStamp); ok { + toSerialize["TimeStamp"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_list_catalog_products_response.go b/services/stackitmarketplace/model_list_catalog_products_response.go index 20617fa15..2affa5312 100644 --- a/services/stackitmarketplace/model_list_catalog_products_response.go +++ b/services/stackitmarketplace/model_list_catalog_products_response.go @@ -17,17 +17,78 @@ import ( // checks if the ListCatalogProductsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListCatalogProductsResponse{} +/* + types and functions for cursor +*/ + +// isNotNullableString +type ListCatalogProductsResponseGetCursorAttributeType = *string + +func getListCatalogProductsResponseGetCursorAttributeTypeOk(arg ListCatalogProductsResponseGetCursorAttributeType) (ret ListCatalogProductsResponseGetCursorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListCatalogProductsResponseGetCursorAttributeType(arg *ListCatalogProductsResponseGetCursorAttributeType, val ListCatalogProductsResponseGetCursorRetType) { + *arg = &val +} + +type ListCatalogProductsResponseGetCursorArgType = string +type ListCatalogProductsResponseGetCursorRetType = string + +/* + types and functions for items +*/ + +// isArray +type ListCatalogProductsResponseGetItemsAttributeType = *[]CatalogProductOverview +type ListCatalogProductsResponseGetItemsArgType = []CatalogProductOverview +type ListCatalogProductsResponseGetItemsRetType = []CatalogProductOverview + +func getListCatalogProductsResponseGetItemsAttributeTypeOk(arg ListCatalogProductsResponseGetItemsAttributeType) (ret ListCatalogProductsResponseGetItemsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListCatalogProductsResponseGetItemsAttributeType(arg *ListCatalogProductsResponseGetItemsAttributeType, val ListCatalogProductsResponseGetItemsRetType) { + *arg = &val +} + +/* + types and functions for limit +*/ + +// isInteger +type ListCatalogProductsResponseGetLimitAttributeType = *int64 +type ListCatalogProductsResponseGetLimitArgType = int64 +type ListCatalogProductsResponseGetLimitRetType = int64 + +func getListCatalogProductsResponseGetLimitAttributeTypeOk(arg ListCatalogProductsResponseGetLimitAttributeType) (ret ListCatalogProductsResponseGetLimitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListCatalogProductsResponseGetLimitAttributeType(arg *ListCatalogProductsResponseGetLimitAttributeType, val ListCatalogProductsResponseGetLimitRetType) { + *arg = &val +} + // ListCatalogProductsResponse struct for ListCatalogProductsResponse type ListCatalogProductsResponse struct { // A pagination cursor that represents a position in the dataset. Use it in subsequent requests to continue retrieving data from this position. If `null`, there are no more results to retrieve. // REQUIRED - Cursor *string `json:"cursor"` + Cursor ListCatalogProductsResponseGetCursorAttributeType `json:"cursor"` // REQUIRED - Items *[]CatalogProductOverview `json:"items"` + Items ListCatalogProductsResponseGetItemsAttributeType `json:"items"` // The maximum number of items to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used. // Can be cast to int32 without loss of precision. // REQUIRED - Limit *int64 `json:"limit"` + Limit ListCatalogProductsResponseGetLimitAttributeType `json:"limit"` } type _ListCatalogProductsResponse ListCatalogProductsResponse @@ -36,11 +97,11 @@ type _ListCatalogProductsResponse ListCatalogProductsResponse // 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 NewListCatalogProductsResponse(cursor *string, items *[]CatalogProductOverview, limit *int64) *ListCatalogProductsResponse { +func NewListCatalogProductsResponse(cursor ListCatalogProductsResponseGetCursorArgType, items ListCatalogProductsResponseGetItemsArgType, limit ListCatalogProductsResponseGetLimitArgType) *ListCatalogProductsResponse { this := ListCatalogProductsResponse{} - this.Cursor = cursor - this.Items = items - this.Limit = limit + setListCatalogProductsResponseGetCursorAttributeType(&this.Cursor, cursor) + setListCatalogProductsResponseGetItemsAttributeType(&this.Items, items) + setListCatalogProductsResponseGetLimitAttributeType(&this.Limit, limit) return &this } @@ -55,82 +116,67 @@ func NewListCatalogProductsResponseWithDefaults() *ListCatalogProductsResponse { } // GetCursor returns the Cursor field value -func (o *ListCatalogProductsResponse) GetCursor() *string { - if o == nil || IsNil(o.Cursor) { - var ret *string - return ret - } - - return o.Cursor +func (o *ListCatalogProductsResponse) GetCursor() (ret ListCatalogProductsResponseGetCursorRetType) { + ret, _ = o.GetCursorOk() + return ret } // GetCursorOk returns a tuple with the Cursor field value // and a boolean to check if the value has been set. -func (o *ListCatalogProductsResponse) GetCursorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Cursor, true +func (o *ListCatalogProductsResponse) GetCursorOk() (ret ListCatalogProductsResponseGetCursorRetType, ok bool) { + return getListCatalogProductsResponseGetCursorAttributeTypeOk(o.Cursor) } // SetCursor sets field value -func (o *ListCatalogProductsResponse) SetCursor(v *string) { - o.Cursor = v +func (o *ListCatalogProductsResponse) SetCursor(v ListCatalogProductsResponseGetCursorRetType) { + setListCatalogProductsResponseGetCursorAttributeType(&o.Cursor, v) } // GetItems returns the Items field value -func (o *ListCatalogProductsResponse) GetItems() *[]CatalogProductOverview { - if o == nil || IsNil(o.Items) { - var ret *[]CatalogProductOverview - return ret - } - - return o.Items +func (o *ListCatalogProductsResponse) GetItems() (ret ListCatalogProductsResponseGetItemsRetType) { + ret, _ = o.GetItemsOk() + return ret } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. -func (o *ListCatalogProductsResponse) GetItemsOk() (*[]CatalogProductOverview, bool) { - if o == nil { - return nil, false - } - return o.Items, true +func (o *ListCatalogProductsResponse) GetItemsOk() (ret ListCatalogProductsResponseGetItemsRetType, ok bool) { + return getListCatalogProductsResponseGetItemsAttributeTypeOk(o.Items) } // SetItems sets field value -func (o *ListCatalogProductsResponse) SetItems(v *[]CatalogProductOverview) { - o.Items = v +func (o *ListCatalogProductsResponse) SetItems(v ListCatalogProductsResponseGetItemsRetType) { + setListCatalogProductsResponseGetItemsAttributeType(&o.Items, v) } // GetLimit returns the Limit field value -func (o *ListCatalogProductsResponse) GetLimit() *int64 { - if o == nil || IsNil(o.Limit) { - var ret *int64 - return ret - } - - return o.Limit +func (o *ListCatalogProductsResponse) GetLimit() (ret ListCatalogProductsResponseGetLimitRetType) { + ret, _ = o.GetLimitOk() + return ret } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. -func (o *ListCatalogProductsResponse) GetLimitOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.Limit, true +func (o *ListCatalogProductsResponse) GetLimitOk() (ret ListCatalogProductsResponseGetLimitRetType, ok bool) { + return getListCatalogProductsResponseGetLimitAttributeTypeOk(o.Limit) } // SetLimit sets field value -func (o *ListCatalogProductsResponse) SetLimit(v *int64) { - o.Limit = v +func (o *ListCatalogProductsResponse) SetLimit(v ListCatalogProductsResponseGetLimitRetType) { + setListCatalogProductsResponseGetLimitAttributeType(&o.Limit, v) } func (o ListCatalogProductsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["cursor"] = o.Cursor - toSerialize["items"] = o.Items - toSerialize["limit"] = o.Limit + if val, ok := getListCatalogProductsResponseGetCursorAttributeTypeOk(o.Cursor); ok { + toSerialize["Cursor"] = val + } + if val, ok := getListCatalogProductsResponseGetItemsAttributeTypeOk(o.Items); ok { + toSerialize["Items"] = val + } + if val, ok := getListCatalogProductsResponseGetLimitAttributeTypeOk(o.Limit); ok { + toSerialize["Limit"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_list_vendor_subscriptions_response.go b/services/stackitmarketplace/model_list_vendor_subscriptions_response.go index bfebaab30..3df1bbe56 100644 --- a/services/stackitmarketplace/model_list_vendor_subscriptions_response.go +++ b/services/stackitmarketplace/model_list_vendor_subscriptions_response.go @@ -17,18 +17,79 @@ import ( // checks if the ListVendorSubscriptionsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListVendorSubscriptionsResponse{} +/* + types and functions for cursor +*/ + +// isNotNullableString +type ListVendorSubscriptionsResponseGetCursorAttributeType = *string + +func getListVendorSubscriptionsResponseGetCursorAttributeTypeOk(arg ListVendorSubscriptionsResponseGetCursorAttributeType) (ret ListVendorSubscriptionsResponseGetCursorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListVendorSubscriptionsResponseGetCursorAttributeType(arg *ListVendorSubscriptionsResponseGetCursorAttributeType, val ListVendorSubscriptionsResponseGetCursorRetType) { + *arg = &val +} + +type ListVendorSubscriptionsResponseGetCursorArgType = string +type ListVendorSubscriptionsResponseGetCursorRetType = string + +/* + types and functions for items +*/ + +// isArray +type ListVendorSubscriptionsResponseGetItemsAttributeType = *[]VendorSubscription +type ListVendorSubscriptionsResponseGetItemsArgType = []VendorSubscription +type ListVendorSubscriptionsResponseGetItemsRetType = []VendorSubscription + +func getListVendorSubscriptionsResponseGetItemsAttributeTypeOk(arg ListVendorSubscriptionsResponseGetItemsAttributeType) (ret ListVendorSubscriptionsResponseGetItemsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListVendorSubscriptionsResponseGetItemsAttributeType(arg *ListVendorSubscriptionsResponseGetItemsAttributeType, val ListVendorSubscriptionsResponseGetItemsRetType) { + *arg = &val +} + +/* + types and functions for limit +*/ + +// isInteger +type ListVendorSubscriptionsResponseGetLimitAttributeType = *int64 +type ListVendorSubscriptionsResponseGetLimitArgType = int64 +type ListVendorSubscriptionsResponseGetLimitRetType = int64 + +func getListVendorSubscriptionsResponseGetLimitAttributeTypeOk(arg ListVendorSubscriptionsResponseGetLimitAttributeType) (ret ListVendorSubscriptionsResponseGetLimitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListVendorSubscriptionsResponseGetLimitAttributeType(arg *ListVendorSubscriptionsResponseGetLimitAttributeType, val ListVendorSubscriptionsResponseGetLimitRetType) { + *arg = &val +} + // ListVendorSubscriptionsResponse struct for ListVendorSubscriptionsResponse type ListVendorSubscriptionsResponse struct { // A pagination cursor that represents a position in the dataset. Use it in subsequent requests to continue retrieving data from this position. If `null`, there are no more results to retrieve. // REQUIRED - Cursor *string `json:"cursor"` + Cursor ListVendorSubscriptionsResponseGetCursorAttributeType `json:"cursor"` // List of subscriptions. // REQUIRED - Items *[]VendorSubscription `json:"items"` + Items ListVendorSubscriptionsResponseGetItemsAttributeType `json:"items"` // Number of subscriptions returned for a single request. // Can be cast to int32 without loss of precision. // REQUIRED - Limit *int64 `json:"limit"` + Limit ListVendorSubscriptionsResponseGetLimitAttributeType `json:"limit"` } type _ListVendorSubscriptionsResponse ListVendorSubscriptionsResponse @@ -37,11 +98,11 @@ type _ListVendorSubscriptionsResponse ListVendorSubscriptionsResponse // 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 NewListVendorSubscriptionsResponse(cursor *string, items *[]VendorSubscription, limit *int64) *ListVendorSubscriptionsResponse { +func NewListVendorSubscriptionsResponse(cursor ListVendorSubscriptionsResponseGetCursorArgType, items ListVendorSubscriptionsResponseGetItemsArgType, limit ListVendorSubscriptionsResponseGetLimitArgType) *ListVendorSubscriptionsResponse { this := ListVendorSubscriptionsResponse{} - this.Cursor = cursor - this.Items = items - this.Limit = limit + setListVendorSubscriptionsResponseGetCursorAttributeType(&this.Cursor, cursor) + setListVendorSubscriptionsResponseGetItemsAttributeType(&this.Items, items) + setListVendorSubscriptionsResponseGetLimitAttributeType(&this.Limit, limit) return &this } @@ -56,82 +117,67 @@ func NewListVendorSubscriptionsResponseWithDefaults() *ListVendorSubscriptionsRe } // GetCursor returns the Cursor field value -func (o *ListVendorSubscriptionsResponse) GetCursor() *string { - if o == nil || IsNil(o.Cursor) { - var ret *string - return ret - } - - return o.Cursor +func (o *ListVendorSubscriptionsResponse) GetCursor() (ret ListVendorSubscriptionsResponseGetCursorRetType) { + ret, _ = o.GetCursorOk() + return ret } // GetCursorOk returns a tuple with the Cursor field value // and a boolean to check if the value has been set. -func (o *ListVendorSubscriptionsResponse) GetCursorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Cursor, true +func (o *ListVendorSubscriptionsResponse) GetCursorOk() (ret ListVendorSubscriptionsResponseGetCursorRetType, ok bool) { + return getListVendorSubscriptionsResponseGetCursorAttributeTypeOk(o.Cursor) } // SetCursor sets field value -func (o *ListVendorSubscriptionsResponse) SetCursor(v *string) { - o.Cursor = v +func (o *ListVendorSubscriptionsResponse) SetCursor(v ListVendorSubscriptionsResponseGetCursorRetType) { + setListVendorSubscriptionsResponseGetCursorAttributeType(&o.Cursor, v) } // GetItems returns the Items field value -func (o *ListVendorSubscriptionsResponse) GetItems() *[]VendorSubscription { - if o == nil || IsNil(o.Items) { - var ret *[]VendorSubscription - return ret - } - - return o.Items +func (o *ListVendorSubscriptionsResponse) GetItems() (ret ListVendorSubscriptionsResponseGetItemsRetType) { + ret, _ = o.GetItemsOk() + return ret } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. -func (o *ListVendorSubscriptionsResponse) GetItemsOk() (*[]VendorSubscription, bool) { - if o == nil { - return nil, false - } - return o.Items, true +func (o *ListVendorSubscriptionsResponse) GetItemsOk() (ret ListVendorSubscriptionsResponseGetItemsRetType, ok bool) { + return getListVendorSubscriptionsResponseGetItemsAttributeTypeOk(o.Items) } // SetItems sets field value -func (o *ListVendorSubscriptionsResponse) SetItems(v *[]VendorSubscription) { - o.Items = v +func (o *ListVendorSubscriptionsResponse) SetItems(v ListVendorSubscriptionsResponseGetItemsRetType) { + setListVendorSubscriptionsResponseGetItemsAttributeType(&o.Items, v) } // GetLimit returns the Limit field value -func (o *ListVendorSubscriptionsResponse) GetLimit() *int64 { - if o == nil || IsNil(o.Limit) { - var ret *int64 - return ret - } - - return o.Limit +func (o *ListVendorSubscriptionsResponse) GetLimit() (ret ListVendorSubscriptionsResponseGetLimitRetType) { + ret, _ = o.GetLimitOk() + return ret } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. -func (o *ListVendorSubscriptionsResponse) GetLimitOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.Limit, true +func (o *ListVendorSubscriptionsResponse) GetLimitOk() (ret ListVendorSubscriptionsResponseGetLimitRetType, ok bool) { + return getListVendorSubscriptionsResponseGetLimitAttributeTypeOk(o.Limit) } // SetLimit sets field value -func (o *ListVendorSubscriptionsResponse) SetLimit(v *int64) { - o.Limit = v +func (o *ListVendorSubscriptionsResponse) SetLimit(v ListVendorSubscriptionsResponseGetLimitRetType) { + setListVendorSubscriptionsResponseGetLimitAttributeType(&o.Limit, v) } func (o ListVendorSubscriptionsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["cursor"] = o.Cursor - toSerialize["items"] = o.Items - toSerialize["limit"] = o.Limit + if val, ok := getListVendorSubscriptionsResponseGetCursorAttributeTypeOk(o.Cursor); ok { + toSerialize["Cursor"] = val + } + if val, ok := getListVendorSubscriptionsResponseGetItemsAttributeTypeOk(o.Items); ok { + toSerialize["Items"] = val + } + if val, ok := getListVendorSubscriptionsResponseGetLimitAttributeTypeOk(o.Limit); ok { + toSerialize["Limit"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_register_testing.go b/services/stackitmarketplace/model_register_testing.go index 8875d5f1a..affb85b15 100644 --- a/services/stackitmarketplace/model_register_testing.go +++ b/services/stackitmarketplace/model_register_testing.go @@ -17,13 +17,53 @@ import ( // checks if the RegisterTesting type satisfies the MappedNullable interface at compile time var _ MappedNullable = &RegisterTesting{} +/* + types and functions for registerTesting +*/ + +// isModel +type RegisterTestingGetRegisterTestingAttributeType = *RegisterTestingRegisterTesting +type RegisterTestingGetRegisterTestingArgType = RegisterTestingRegisterTesting +type RegisterTestingGetRegisterTestingRetType = RegisterTestingRegisterTesting + +func getRegisterTestingGetRegisterTestingAttributeTypeOk(arg RegisterTestingGetRegisterTestingAttributeType) (ret RegisterTestingGetRegisterTestingRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRegisterTestingGetRegisterTestingAttributeType(arg *RegisterTestingGetRegisterTestingAttributeType, val RegisterTestingGetRegisterTestingRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isEnumRef +type RegisterTestingGetTypeAttributeType = *string +type RegisterTestingGetTypeArgType = string +type RegisterTestingGetTypeRetType = string + +func getRegisterTestingGetTypeAttributeTypeOk(arg RegisterTestingGetTypeAttributeType) (ret RegisterTestingGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRegisterTestingGetTypeAttributeType(arg *RegisterTestingGetTypeAttributeType, val RegisterTestingGetTypeRetType) { + *arg = &val +} + // RegisterTesting Register for testing. type RegisterTesting struct { // REQUIRED - RegisterTesting *RegisterTestingRegisterTesting `json:"registerTesting"` + RegisterTesting RegisterTestingGetRegisterTestingAttributeType `json:"registerTesting"` // The form type. // REQUIRED - Type *string `json:"type"` + Type RegisterTestingGetTypeAttributeType `json:"type"` } type _RegisterTesting RegisterTesting @@ -32,10 +72,10 @@ type _RegisterTesting RegisterTesting // 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 NewRegisterTesting(registerTesting *RegisterTestingRegisterTesting, type_ *string) *RegisterTesting { +func NewRegisterTesting(registerTesting RegisterTestingGetRegisterTestingArgType, type_ RegisterTestingGetTypeArgType) *RegisterTesting { this := RegisterTesting{} - this.RegisterTesting = registerTesting - this.Type = type_ + setRegisterTestingGetRegisterTestingAttributeType(&this.RegisterTesting, registerTesting) + setRegisterTestingGetTypeAttributeType(&this.Type, type_) return &this } @@ -48,57 +88,47 @@ func NewRegisterTestingWithDefaults() *RegisterTesting { } // GetRegisterTesting returns the RegisterTesting field value -func (o *RegisterTesting) GetRegisterTesting() *RegisterTestingRegisterTesting { - if o == nil || IsNil(o.RegisterTesting) { - var ret *RegisterTestingRegisterTesting - return ret - } - - return o.RegisterTesting +func (o *RegisterTesting) GetRegisterTesting() (ret RegisterTestingGetRegisterTestingRetType) { + ret, _ = o.GetRegisterTestingOk() + return ret } // GetRegisterTestingOk returns a tuple with the RegisterTesting field value // and a boolean to check if the value has been set. -func (o *RegisterTesting) GetRegisterTestingOk() (*RegisterTestingRegisterTesting, bool) { - if o == nil { - return nil, false - } - return o.RegisterTesting, true +func (o *RegisterTesting) GetRegisterTestingOk() (ret RegisterTestingGetRegisterTestingRetType, ok bool) { + return getRegisterTestingGetRegisterTestingAttributeTypeOk(o.RegisterTesting) } // SetRegisterTesting sets field value -func (o *RegisterTesting) SetRegisterTesting(v *RegisterTestingRegisterTesting) { - o.RegisterTesting = v +func (o *RegisterTesting) SetRegisterTesting(v RegisterTestingGetRegisterTestingRetType) { + setRegisterTestingGetRegisterTestingAttributeType(&o.RegisterTesting, v) } // GetType returns the Type field value -func (o *RegisterTesting) GetType() *string { - if o == nil || IsNil(o.Type) { - var ret *string - return ret - } - - return o.Type +func (o *RegisterTesting) GetType() (ret RegisterTestingGetTypeRetType) { + 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 *RegisterTesting) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Type, true +func (o *RegisterTesting) GetTypeOk() (ret RegisterTestingGetTypeRetType, ok bool) { + return getRegisterTestingGetTypeAttributeTypeOk(o.Type) } // SetType sets field value -func (o *RegisterTesting) SetType(v *string) { - o.Type = v +func (o *RegisterTesting) SetType(v RegisterTestingGetTypeRetType) { + setRegisterTestingGetTypeAttributeType(&o.Type, v) } func (o RegisterTesting) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["registerTesting"] = o.RegisterTesting - toSerialize["type"] = o.Type + if val, ok := getRegisterTestingGetRegisterTestingAttributeTypeOk(o.RegisterTesting); ok { + toSerialize["RegisterTesting"] = val + } + if val, ok := getRegisterTestingGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_register_testing_register_testing.go b/services/stackitmarketplace/model_register_testing_register_testing.go index 06491effd..6ac07646f 100644 --- a/services/stackitmarketplace/model_register_testing_register_testing.go +++ b/services/stackitmarketplace/model_register_testing_register_testing.go @@ -17,17 +17,80 @@ import ( // checks if the RegisterTestingRegisterTesting type satisfies the MappedNullable interface at compile time var _ MappedNullable = &RegisterTestingRegisterTesting{} +/* + types and functions for contactEmail +*/ + +// isNotNullableString +type RegisterTestingRegisterTestingGetContactEmailAttributeType = *string + +func getRegisterTestingRegisterTestingGetContactEmailAttributeTypeOk(arg RegisterTestingRegisterTestingGetContactEmailAttributeType) (ret RegisterTestingRegisterTestingGetContactEmailRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRegisterTestingRegisterTestingGetContactEmailAttributeType(arg *RegisterTestingRegisterTestingGetContactEmailAttributeType, val RegisterTestingRegisterTestingGetContactEmailRetType) { + *arg = &val +} + +type RegisterTestingRegisterTestingGetContactEmailArgType = string +type RegisterTestingRegisterTestingGetContactEmailRetType = string + +/* + types and functions for fullName +*/ + +// isNotNullableString +type RegisterTestingRegisterTestingGetFullNameAttributeType = *string + +func getRegisterTestingRegisterTestingGetFullNameAttributeTypeOk(arg RegisterTestingRegisterTestingGetFullNameAttributeType) (ret RegisterTestingRegisterTestingGetFullNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRegisterTestingRegisterTestingGetFullNameAttributeType(arg *RegisterTestingRegisterTestingGetFullNameAttributeType, val RegisterTestingRegisterTestingGetFullNameRetType) { + *arg = &val +} + +type RegisterTestingRegisterTestingGetFullNameArgType = string +type RegisterTestingRegisterTestingGetFullNameRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +type RegisterTestingRegisterTestingGetMessageAttributeType = *string + +func getRegisterTestingRegisterTestingGetMessageAttributeTypeOk(arg RegisterTestingRegisterTestingGetMessageAttributeType) (ret RegisterTestingRegisterTestingGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRegisterTestingRegisterTestingGetMessageAttributeType(arg *RegisterTestingRegisterTestingGetMessageAttributeType, val RegisterTestingRegisterTestingGetMessageRetType) { + *arg = &val +} + +type RegisterTestingRegisterTestingGetMessageArgType = string +type RegisterTestingRegisterTestingGetMessageRetType = string + // RegisterTestingRegisterTesting struct for RegisterTestingRegisterTesting type RegisterTestingRegisterTesting struct { // The contact e-mail address. // REQUIRED - ContactEmail *string `json:"contactEmail"` + ContactEmail RegisterTestingRegisterTestingGetContactEmailAttributeType `json:"contactEmail"` // The full name of the contact person. // REQUIRED - FullName *string `json:"fullName"` + FullName RegisterTestingRegisterTestingGetFullNameAttributeType `json:"fullName"` // The message content. // REQUIRED - Message *string `json:"message"` + Message RegisterTestingRegisterTestingGetMessageAttributeType `json:"message"` } type _RegisterTestingRegisterTesting RegisterTestingRegisterTesting @@ -36,11 +99,11 @@ type _RegisterTestingRegisterTesting RegisterTestingRegisterTesting // 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 NewRegisterTestingRegisterTesting(contactEmail *string, fullName *string, message *string) *RegisterTestingRegisterTesting { +func NewRegisterTestingRegisterTesting(contactEmail RegisterTestingRegisterTestingGetContactEmailArgType, fullName RegisterTestingRegisterTestingGetFullNameArgType, message RegisterTestingRegisterTestingGetMessageArgType) *RegisterTestingRegisterTesting { this := RegisterTestingRegisterTesting{} - this.ContactEmail = contactEmail - this.FullName = fullName - this.Message = message + setRegisterTestingRegisterTestingGetContactEmailAttributeType(&this.ContactEmail, contactEmail) + setRegisterTestingRegisterTestingGetFullNameAttributeType(&this.FullName, fullName) + setRegisterTestingRegisterTestingGetMessageAttributeType(&this.Message, message) return &this } @@ -53,82 +116,67 @@ func NewRegisterTestingRegisterTestingWithDefaults() *RegisterTestingRegisterTes } // GetContactEmail returns the ContactEmail field value -func (o *RegisterTestingRegisterTesting) GetContactEmail() *string { - if o == nil || IsNil(o.ContactEmail) { - var ret *string - return ret - } - - return o.ContactEmail +func (o *RegisterTestingRegisterTesting) GetContactEmail() (ret RegisterTestingRegisterTestingGetContactEmailRetType) { + 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 *RegisterTestingRegisterTesting) GetContactEmailOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ContactEmail, true +func (o *RegisterTestingRegisterTesting) GetContactEmailOk() (ret RegisterTestingRegisterTestingGetContactEmailRetType, ok bool) { + return getRegisterTestingRegisterTestingGetContactEmailAttributeTypeOk(o.ContactEmail) } // SetContactEmail sets field value -func (o *RegisterTestingRegisterTesting) SetContactEmail(v *string) { - o.ContactEmail = v +func (o *RegisterTestingRegisterTesting) SetContactEmail(v RegisterTestingRegisterTestingGetContactEmailRetType) { + setRegisterTestingRegisterTestingGetContactEmailAttributeType(&o.ContactEmail, v) } // GetFullName returns the FullName field value -func (o *RegisterTestingRegisterTesting) GetFullName() *string { - if o == nil || IsNil(o.FullName) { - var ret *string - return ret - } - - return o.FullName +func (o *RegisterTestingRegisterTesting) GetFullName() (ret RegisterTestingRegisterTestingGetFullNameRetType) { + 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 *RegisterTestingRegisterTesting) GetFullNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.FullName, true +func (o *RegisterTestingRegisterTesting) GetFullNameOk() (ret RegisterTestingRegisterTestingGetFullNameRetType, ok bool) { + return getRegisterTestingRegisterTestingGetFullNameAttributeTypeOk(o.FullName) } // SetFullName sets field value -func (o *RegisterTestingRegisterTesting) SetFullName(v *string) { - o.FullName = v +func (o *RegisterTestingRegisterTesting) SetFullName(v RegisterTestingRegisterTestingGetFullNameRetType) { + setRegisterTestingRegisterTestingGetFullNameAttributeType(&o.FullName, v) } // GetMessage returns the Message field value -func (o *RegisterTestingRegisterTesting) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *RegisterTestingRegisterTesting) GetMessage() (ret RegisterTestingRegisterTestingGetMessageRetType) { + 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 *RegisterTestingRegisterTesting) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Message, true +func (o *RegisterTestingRegisterTesting) GetMessageOk() (ret RegisterTestingRegisterTestingGetMessageRetType, ok bool) { + return getRegisterTestingRegisterTestingGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *RegisterTestingRegisterTesting) SetMessage(v *string) { - o.Message = v +func (o *RegisterTestingRegisterTesting) SetMessage(v RegisterTestingRegisterTestingGetMessageRetType) { + setRegisterTestingRegisterTestingGetMessageAttributeType(&o.Message, v) } func (o RegisterTestingRegisterTesting) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["contactEmail"] = o.ContactEmail - toSerialize["fullName"] = o.FullName - toSerialize["message"] = o.Message + if val, ok := getRegisterTestingRegisterTestingGetContactEmailAttributeTypeOk(o.ContactEmail); ok { + toSerialize["ContactEmail"] = val + } + if val, ok := getRegisterTestingRegisterTestingGetFullNameAttributeTypeOk(o.FullName); ok { + toSerialize["FullName"] = val + } + if val, ok := getRegisterTestingRegisterTestingGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_requested_subscription_state_response.go b/services/stackitmarketplace/model_requested_subscription_state_response.go index f6ed66fa4..1cc680118 100644 --- a/services/stackitmarketplace/model_requested_subscription_state_response.go +++ b/services/stackitmarketplace/model_requested_subscription_state_response.go @@ -17,14 +17,55 @@ import ( // checks if the RequestedSubscriptionStateResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &RequestedSubscriptionStateResponse{} +/* + types and functions for lifecycleState +*/ + +// isEnumRef +type RequestedSubscriptionStateResponseGetLifecycleStateAttributeType = *string +type RequestedSubscriptionStateResponseGetLifecycleStateArgType = string +type RequestedSubscriptionStateResponseGetLifecycleStateRetType = string + +func getRequestedSubscriptionStateResponseGetLifecycleStateAttributeTypeOk(arg RequestedSubscriptionStateResponseGetLifecycleStateAttributeType) (ret RequestedSubscriptionStateResponseGetLifecycleStateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRequestedSubscriptionStateResponseGetLifecycleStateAttributeType(arg *RequestedSubscriptionStateResponseGetLifecycleStateAttributeType, val RequestedSubscriptionStateResponseGetLifecycleStateRetType) { + *arg = &val +} + +/* + types and functions for subscriptionId +*/ + +// isNotNullableString +type RequestedSubscriptionStateResponseGetSubscriptionIdAttributeType = *string + +func getRequestedSubscriptionStateResponseGetSubscriptionIdAttributeTypeOk(arg RequestedSubscriptionStateResponseGetSubscriptionIdAttributeType) (ret RequestedSubscriptionStateResponseGetSubscriptionIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRequestedSubscriptionStateResponseGetSubscriptionIdAttributeType(arg *RequestedSubscriptionStateResponseGetSubscriptionIdAttributeType, val RequestedSubscriptionStateResponseGetSubscriptionIdRetType) { + *arg = &val +} + +type RequestedSubscriptionStateResponseGetSubscriptionIdArgType = string +type RequestedSubscriptionStateResponseGetSubscriptionIdRetType = string + // RequestedSubscriptionStateResponse struct for RequestedSubscriptionStateResponse type RequestedSubscriptionStateResponse struct { // Lifecycle state of the subscription. // REQUIRED - LifecycleState *string `json:"lifecycleState"` + LifecycleState RequestedSubscriptionStateResponseGetLifecycleStateAttributeType `json:"lifecycleState"` // The subscription ID. // REQUIRED - SubscriptionId *string `json:"subscriptionId"` + SubscriptionId RequestedSubscriptionStateResponseGetSubscriptionIdAttributeType `json:"subscriptionId"` } type _RequestedSubscriptionStateResponse RequestedSubscriptionStateResponse @@ -33,10 +74,10 @@ type _RequestedSubscriptionStateResponse RequestedSubscriptionStateResponse // 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 NewRequestedSubscriptionStateResponse(lifecycleState *string, subscriptionId *string) *RequestedSubscriptionStateResponse { +func NewRequestedSubscriptionStateResponse(lifecycleState RequestedSubscriptionStateResponseGetLifecycleStateArgType, subscriptionId RequestedSubscriptionStateResponseGetSubscriptionIdArgType) *RequestedSubscriptionStateResponse { this := RequestedSubscriptionStateResponse{} - this.LifecycleState = lifecycleState - this.SubscriptionId = subscriptionId + setRequestedSubscriptionStateResponseGetLifecycleStateAttributeType(&this.LifecycleState, lifecycleState) + setRequestedSubscriptionStateResponseGetSubscriptionIdAttributeType(&this.SubscriptionId, subscriptionId) return &this } @@ -49,57 +90,47 @@ func NewRequestedSubscriptionStateResponseWithDefaults() *RequestedSubscriptionS } // GetLifecycleState returns the LifecycleState field value -func (o *RequestedSubscriptionStateResponse) GetLifecycleState() *string { - if o == nil || IsNil(o.LifecycleState) { - var ret *string - return ret - } - - return o.LifecycleState +func (o *RequestedSubscriptionStateResponse) GetLifecycleState() (ret RequestedSubscriptionStateResponseGetLifecycleStateRetType) { + ret, _ = o.GetLifecycleStateOk() + return ret } // GetLifecycleStateOk returns a tuple with the LifecycleState field value // and a boolean to check if the value has been set. -func (o *RequestedSubscriptionStateResponse) GetLifecycleStateOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.LifecycleState, true +func (o *RequestedSubscriptionStateResponse) GetLifecycleStateOk() (ret RequestedSubscriptionStateResponseGetLifecycleStateRetType, ok bool) { + return getRequestedSubscriptionStateResponseGetLifecycleStateAttributeTypeOk(o.LifecycleState) } // SetLifecycleState sets field value -func (o *RequestedSubscriptionStateResponse) SetLifecycleState(v *string) { - o.LifecycleState = v +func (o *RequestedSubscriptionStateResponse) SetLifecycleState(v RequestedSubscriptionStateResponseGetLifecycleStateRetType) { + setRequestedSubscriptionStateResponseGetLifecycleStateAttributeType(&o.LifecycleState, v) } // GetSubscriptionId returns the SubscriptionId field value -func (o *RequestedSubscriptionStateResponse) GetSubscriptionId() *string { - if o == nil || IsNil(o.SubscriptionId) { - var ret *string - return ret - } - - return o.SubscriptionId +func (o *RequestedSubscriptionStateResponse) GetSubscriptionId() (ret RequestedSubscriptionStateResponseGetSubscriptionIdRetType) { + ret, _ = o.GetSubscriptionIdOk() + return ret } // GetSubscriptionIdOk returns a tuple with the SubscriptionId field value // and a boolean to check if the value has been set. -func (o *RequestedSubscriptionStateResponse) GetSubscriptionIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.SubscriptionId, true +func (o *RequestedSubscriptionStateResponse) GetSubscriptionIdOk() (ret RequestedSubscriptionStateResponseGetSubscriptionIdRetType, ok bool) { + return getRequestedSubscriptionStateResponseGetSubscriptionIdAttributeTypeOk(o.SubscriptionId) } // SetSubscriptionId sets field value -func (o *RequestedSubscriptionStateResponse) SetSubscriptionId(v *string) { - o.SubscriptionId = v +func (o *RequestedSubscriptionStateResponse) SetSubscriptionId(v RequestedSubscriptionStateResponseGetSubscriptionIdRetType) { + setRequestedSubscriptionStateResponseGetSubscriptionIdAttributeType(&o.SubscriptionId, v) } func (o RequestedSubscriptionStateResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["lifecycleState"] = o.LifecycleState - toSerialize["subscriptionId"] = o.SubscriptionId + if val, ok := getRequestedSubscriptionStateResponseGetLifecycleStateAttributeTypeOk(o.LifecycleState); ok { + toSerialize["LifecycleState"] = val + } + if val, ok := getRequestedSubscriptionStateResponseGetSubscriptionIdAttributeTypeOk(o.SubscriptionId); ok { + toSerialize["SubscriptionId"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_resolve_customer_payload.go b/services/stackitmarketplace/model_resolve_customer_payload.go index 5c595d9da..07a050c82 100644 --- a/services/stackitmarketplace/model_resolve_customer_payload.go +++ b/services/stackitmarketplace/model_resolve_customer_payload.go @@ -17,11 +17,32 @@ import ( // checks if the ResolveCustomerPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ResolveCustomerPayload{} +/* + types and functions for token +*/ + +// isNotNullableString +type ResolveCustomerPayloadGetTokenAttributeType = *string + +func getResolveCustomerPayloadGetTokenAttributeTypeOk(arg ResolveCustomerPayloadGetTokenAttributeType) (ret ResolveCustomerPayloadGetTokenRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setResolveCustomerPayloadGetTokenAttributeType(arg *ResolveCustomerPayloadGetTokenAttributeType, val ResolveCustomerPayloadGetTokenRetType) { + *arg = &val +} + +type ResolveCustomerPayloadGetTokenArgType = string +type ResolveCustomerPayloadGetTokenRetType = string + // ResolveCustomerPayload struct for ResolveCustomerPayload type ResolveCustomerPayload struct { // Opaque token exchangeable for subscription details. // REQUIRED - Token *string `json:"token"` + Token ResolveCustomerPayloadGetTokenAttributeType `json:"token"` } type _ResolveCustomerPayload ResolveCustomerPayload @@ -30,9 +51,9 @@ type _ResolveCustomerPayload ResolveCustomerPayload // 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 NewResolveCustomerPayload(token *string) *ResolveCustomerPayload { +func NewResolveCustomerPayload(token ResolveCustomerPayloadGetTokenArgType) *ResolveCustomerPayload { this := ResolveCustomerPayload{} - this.Token = token + setResolveCustomerPayloadGetTokenAttributeType(&this.Token, token) return &this } @@ -45,32 +66,27 @@ func NewResolveCustomerPayloadWithDefaults() *ResolveCustomerPayload { } // GetToken returns the Token field value -func (o *ResolveCustomerPayload) GetToken() *string { - if o == nil || IsNil(o.Token) { - var ret *string - return ret - } - - return o.Token +func (o *ResolveCustomerPayload) GetToken() (ret ResolveCustomerPayloadGetTokenRetType) { + ret, _ = o.GetTokenOk() + return ret } // GetTokenOk returns a tuple with the Token field value // and a boolean to check if the value has been set. -func (o *ResolveCustomerPayload) GetTokenOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Token, true +func (o *ResolveCustomerPayload) GetTokenOk() (ret ResolveCustomerPayloadGetTokenRetType, ok bool) { + return getResolveCustomerPayloadGetTokenAttributeTypeOk(o.Token) } // SetToken sets field value -func (o *ResolveCustomerPayload) SetToken(v *string) { - o.Token = v +func (o *ResolveCustomerPayload) SetToken(v ResolveCustomerPayloadGetTokenRetType) { + setResolveCustomerPayloadGetTokenAttributeType(&o.Token, v) } func (o ResolveCustomerPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["token"] = o.Token + if val, ok := getResolveCustomerPayloadGetTokenAttributeTypeOk(o.Token); ok { + toSerialize["Token"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_subscription_cancel_response.go b/services/stackitmarketplace/model_subscription_cancel_response.go index e9a644eba..b014344fb 100644 --- a/services/stackitmarketplace/model_subscription_cancel_response.go +++ b/services/stackitmarketplace/model_subscription_cancel_response.go @@ -17,12 +17,52 @@ import ( // checks if the SubscriptionCancelResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &SubscriptionCancelResponse{} +/* + types and functions for currentSubscription +*/ + +// isModel +type SubscriptionCancelResponseGetCurrentSubscriptionAttributeType = *CurrentSubscriptionStateResponse +type SubscriptionCancelResponseGetCurrentSubscriptionArgType = CurrentSubscriptionStateResponse +type SubscriptionCancelResponseGetCurrentSubscriptionRetType = CurrentSubscriptionStateResponse + +func getSubscriptionCancelResponseGetCurrentSubscriptionAttributeTypeOk(arg SubscriptionCancelResponseGetCurrentSubscriptionAttributeType) (ret SubscriptionCancelResponseGetCurrentSubscriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSubscriptionCancelResponseGetCurrentSubscriptionAttributeType(arg *SubscriptionCancelResponseGetCurrentSubscriptionAttributeType, val SubscriptionCancelResponseGetCurrentSubscriptionRetType) { + *arg = &val +} + +/* + types and functions for requestedSubscription +*/ + +// isModel +type SubscriptionCancelResponseGetRequestedSubscriptionAttributeType = *RequestedSubscriptionStateResponse +type SubscriptionCancelResponseGetRequestedSubscriptionArgType = RequestedSubscriptionStateResponse +type SubscriptionCancelResponseGetRequestedSubscriptionRetType = RequestedSubscriptionStateResponse + +func getSubscriptionCancelResponseGetRequestedSubscriptionAttributeTypeOk(arg SubscriptionCancelResponseGetRequestedSubscriptionAttributeType) (ret SubscriptionCancelResponseGetRequestedSubscriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSubscriptionCancelResponseGetRequestedSubscriptionAttributeType(arg *SubscriptionCancelResponseGetRequestedSubscriptionAttributeType, val SubscriptionCancelResponseGetRequestedSubscriptionRetType) { + *arg = &val +} + // SubscriptionCancelResponse struct for SubscriptionCancelResponse type SubscriptionCancelResponse struct { // REQUIRED - CurrentSubscription *CurrentSubscriptionStateResponse `json:"currentSubscription"` + CurrentSubscription SubscriptionCancelResponseGetCurrentSubscriptionAttributeType `json:"currentSubscription"` // REQUIRED - RequestedSubscription *RequestedSubscriptionStateResponse `json:"requestedSubscription"` + RequestedSubscription SubscriptionCancelResponseGetRequestedSubscriptionAttributeType `json:"requestedSubscription"` } type _SubscriptionCancelResponse SubscriptionCancelResponse @@ -31,10 +71,10 @@ type _SubscriptionCancelResponse SubscriptionCancelResponse // 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 NewSubscriptionCancelResponse(currentSubscription *CurrentSubscriptionStateResponse, requestedSubscription *RequestedSubscriptionStateResponse) *SubscriptionCancelResponse { +func NewSubscriptionCancelResponse(currentSubscription SubscriptionCancelResponseGetCurrentSubscriptionArgType, requestedSubscription SubscriptionCancelResponseGetRequestedSubscriptionArgType) *SubscriptionCancelResponse { this := SubscriptionCancelResponse{} - this.CurrentSubscription = currentSubscription - this.RequestedSubscription = requestedSubscription + setSubscriptionCancelResponseGetCurrentSubscriptionAttributeType(&this.CurrentSubscription, currentSubscription) + setSubscriptionCancelResponseGetRequestedSubscriptionAttributeType(&this.RequestedSubscription, requestedSubscription) return &this } @@ -47,57 +87,47 @@ func NewSubscriptionCancelResponseWithDefaults() *SubscriptionCancelResponse { } // GetCurrentSubscription returns the CurrentSubscription field value -func (o *SubscriptionCancelResponse) GetCurrentSubscription() *CurrentSubscriptionStateResponse { - if o == nil || IsNil(o.CurrentSubscription) { - var ret *CurrentSubscriptionStateResponse - return ret - } - - return o.CurrentSubscription +func (o *SubscriptionCancelResponse) GetCurrentSubscription() (ret SubscriptionCancelResponseGetCurrentSubscriptionRetType) { + ret, _ = o.GetCurrentSubscriptionOk() + return ret } // GetCurrentSubscriptionOk returns a tuple with the CurrentSubscription field value // and a boolean to check if the value has been set. -func (o *SubscriptionCancelResponse) GetCurrentSubscriptionOk() (*CurrentSubscriptionStateResponse, bool) { - if o == nil { - return nil, false - } - return o.CurrentSubscription, true +func (o *SubscriptionCancelResponse) GetCurrentSubscriptionOk() (ret SubscriptionCancelResponseGetCurrentSubscriptionRetType, ok bool) { + return getSubscriptionCancelResponseGetCurrentSubscriptionAttributeTypeOk(o.CurrentSubscription) } // SetCurrentSubscription sets field value -func (o *SubscriptionCancelResponse) SetCurrentSubscription(v *CurrentSubscriptionStateResponse) { - o.CurrentSubscription = v +func (o *SubscriptionCancelResponse) SetCurrentSubscription(v SubscriptionCancelResponseGetCurrentSubscriptionRetType) { + setSubscriptionCancelResponseGetCurrentSubscriptionAttributeType(&o.CurrentSubscription, v) } // GetRequestedSubscription returns the RequestedSubscription field value -func (o *SubscriptionCancelResponse) GetRequestedSubscription() *RequestedSubscriptionStateResponse { - if o == nil || IsNil(o.RequestedSubscription) { - var ret *RequestedSubscriptionStateResponse - return ret - } - - return o.RequestedSubscription +func (o *SubscriptionCancelResponse) GetRequestedSubscription() (ret SubscriptionCancelResponseGetRequestedSubscriptionRetType) { + ret, _ = o.GetRequestedSubscriptionOk() + return ret } // GetRequestedSubscriptionOk returns a tuple with the RequestedSubscription field value // and a boolean to check if the value has been set. -func (o *SubscriptionCancelResponse) GetRequestedSubscriptionOk() (*RequestedSubscriptionStateResponse, bool) { - if o == nil { - return nil, false - } - return o.RequestedSubscription, true +func (o *SubscriptionCancelResponse) GetRequestedSubscriptionOk() (ret SubscriptionCancelResponseGetRequestedSubscriptionRetType, ok bool) { + return getSubscriptionCancelResponseGetRequestedSubscriptionAttributeTypeOk(o.RequestedSubscription) } // SetRequestedSubscription sets field value -func (o *SubscriptionCancelResponse) SetRequestedSubscription(v *RequestedSubscriptionStateResponse) { - o.RequestedSubscription = v +func (o *SubscriptionCancelResponse) SetRequestedSubscription(v SubscriptionCancelResponseGetRequestedSubscriptionRetType) { + setSubscriptionCancelResponseGetRequestedSubscriptionAttributeType(&o.RequestedSubscription, v) } func (o SubscriptionCancelResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["currentSubscription"] = o.CurrentSubscription - toSerialize["requestedSubscription"] = o.RequestedSubscription + if val, ok := getSubscriptionCancelResponseGetCurrentSubscriptionAttributeTypeOk(o.CurrentSubscription); ok { + toSerialize["CurrentSubscription"] = val + } + if val, ok := getSubscriptionCancelResponseGetRequestedSubscriptionAttributeTypeOk(o.RequestedSubscription); ok { + toSerialize["RequestedSubscription"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_subscription_product.go b/services/stackitmarketplace/model_subscription_product.go index 2d0b43ff4..6aa696a46 100644 --- a/services/stackitmarketplace/model_subscription_product.go +++ b/services/stackitmarketplace/model_subscription_product.go @@ -17,32 +17,197 @@ import ( // checks if the SubscriptionProduct type satisfies the MappedNullable interface at compile time var _ MappedNullable = &SubscriptionProduct{} +/* + types and functions for deliveryMethod +*/ + +// isEnumRef +type SubscriptionProductGetDeliveryMethodAttributeType = *string +type SubscriptionProductGetDeliveryMethodArgType = string +type SubscriptionProductGetDeliveryMethodRetType = string + +func getSubscriptionProductGetDeliveryMethodAttributeTypeOk(arg SubscriptionProductGetDeliveryMethodAttributeType) (ret SubscriptionProductGetDeliveryMethodRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSubscriptionProductGetDeliveryMethodAttributeType(arg *SubscriptionProductGetDeliveryMethodAttributeType, val SubscriptionProductGetDeliveryMethodRetType) { + *arg = &val +} + +/* + types and functions for lifecycleState +*/ + +// isEnumRef +type SubscriptionProductGetLifecycleStateAttributeType = *string +type SubscriptionProductGetLifecycleStateArgType = string +type SubscriptionProductGetLifecycleStateRetType = string + +func getSubscriptionProductGetLifecycleStateAttributeTypeOk(arg SubscriptionProductGetLifecycleStateAttributeType) (ret SubscriptionProductGetLifecycleStateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSubscriptionProductGetLifecycleStateAttributeType(arg *SubscriptionProductGetLifecycleStateAttributeType, val SubscriptionProductGetLifecycleStateRetType) { + *arg = &val +} + +/* + types and functions for priceType +*/ + +// isEnumRef +type SubscriptionProductGetPriceTypeAttributeType = *string +type SubscriptionProductGetPriceTypeArgType = string +type SubscriptionProductGetPriceTypeRetType = string + +func getSubscriptionProductGetPriceTypeAttributeTypeOk(arg SubscriptionProductGetPriceTypeAttributeType) (ret SubscriptionProductGetPriceTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSubscriptionProductGetPriceTypeAttributeType(arg *SubscriptionProductGetPriceTypeAttributeType, val SubscriptionProductGetPriceTypeRetType) { + *arg = &val +} + +/* + types and functions for pricingPlan +*/ + +// isNotNullableString +type SubscriptionProductGetPricingPlanAttributeType = *string + +func getSubscriptionProductGetPricingPlanAttributeTypeOk(arg SubscriptionProductGetPricingPlanAttributeType) (ret SubscriptionProductGetPricingPlanRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSubscriptionProductGetPricingPlanAttributeType(arg *SubscriptionProductGetPricingPlanAttributeType, val SubscriptionProductGetPricingPlanRetType) { + *arg = &val +} + +type SubscriptionProductGetPricingPlanArgType = string +type SubscriptionProductGetPricingPlanRetType = string + +/* + types and functions for productId +*/ + +// isNotNullableString +type SubscriptionProductGetProductIdAttributeType = *string + +func getSubscriptionProductGetProductIdAttributeTypeOk(arg SubscriptionProductGetProductIdAttributeType) (ret SubscriptionProductGetProductIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSubscriptionProductGetProductIdAttributeType(arg *SubscriptionProductGetProductIdAttributeType, val SubscriptionProductGetProductIdRetType) { + *arg = &val +} + +type SubscriptionProductGetProductIdArgType = string +type SubscriptionProductGetProductIdRetType = string + +/* + types and functions for productName +*/ + +// isNotNullableString +type SubscriptionProductGetProductNameAttributeType = *string + +func getSubscriptionProductGetProductNameAttributeTypeOk(arg SubscriptionProductGetProductNameAttributeType) (ret SubscriptionProductGetProductNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSubscriptionProductGetProductNameAttributeType(arg *SubscriptionProductGetProductNameAttributeType, val SubscriptionProductGetProductNameRetType) { + *arg = &val +} + +type SubscriptionProductGetProductNameArgType = string +type SubscriptionProductGetProductNameRetType = string + +/* + types and functions for vendorName +*/ + +// isNotNullableString +type SubscriptionProductGetVendorNameAttributeType = *string + +func getSubscriptionProductGetVendorNameAttributeTypeOk(arg SubscriptionProductGetVendorNameAttributeType) (ret SubscriptionProductGetVendorNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSubscriptionProductGetVendorNameAttributeType(arg *SubscriptionProductGetVendorNameAttributeType, val SubscriptionProductGetVendorNameRetType) { + *arg = &val +} + +type SubscriptionProductGetVendorNameArgType = string +type SubscriptionProductGetVendorNameRetType = string + +/* + types and functions for vendorWebsiteUrl +*/ + +// isNotNullableString +type SubscriptionProductGetVendorWebsiteUrlAttributeType = *string + +func getSubscriptionProductGetVendorWebsiteUrlAttributeTypeOk(arg SubscriptionProductGetVendorWebsiteUrlAttributeType) (ret SubscriptionProductGetVendorWebsiteUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSubscriptionProductGetVendorWebsiteUrlAttributeType(arg *SubscriptionProductGetVendorWebsiteUrlAttributeType, val SubscriptionProductGetVendorWebsiteUrlRetType) { + *arg = &val +} + +type SubscriptionProductGetVendorWebsiteUrlArgType = string +type SubscriptionProductGetVendorWebsiteUrlRetType = string + // SubscriptionProduct struct for SubscriptionProduct type SubscriptionProduct struct { // The product's delivery method. // REQUIRED - DeliveryMethod *string `json:"deliveryMethod"` + DeliveryMethod SubscriptionProductGetDeliveryMethodAttributeType `json:"deliveryMethod"` // The lifecycle state of the product. // REQUIRED - LifecycleState *string `json:"lifecycleState"` + LifecycleState SubscriptionProductGetLifecycleStateAttributeType `json:"lifecycleState"` // The product's price type. // REQUIRED - PriceType *string `json:"priceType"` + PriceType SubscriptionProductGetPriceTypeAttributeType `json:"priceType"` // The product's pricing plan. // REQUIRED - PricingPlan *string `json:"pricingPlan"` + PricingPlan SubscriptionProductGetPricingPlanAttributeType `json:"pricingPlan"` // The product ID. // REQUIRED - ProductId *string `json:"productId"` + ProductId SubscriptionProductGetProductIdAttributeType `json:"productId"` // The name of the product. // REQUIRED - ProductName *string `json:"productName"` + ProductName SubscriptionProductGetProductNameAttributeType `json:"productName"` // The product's vendor name. // REQUIRED - VendorName *string `json:"vendorName"` + VendorName SubscriptionProductGetVendorNameAttributeType `json:"vendorName"` // The vendor's website. // REQUIRED - VendorWebsiteUrl *string `json:"vendorWebsiteUrl"` + VendorWebsiteUrl SubscriptionProductGetVendorWebsiteUrlAttributeType `json:"vendorWebsiteUrl"` } type _SubscriptionProduct SubscriptionProduct @@ -51,16 +216,16 @@ type _SubscriptionProduct SubscriptionProduct // 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 NewSubscriptionProduct(deliveryMethod *string, lifecycleState *string, priceType *string, pricingPlan *string, productId *string, productName *string, vendorName *string, vendorWebsiteUrl *string) *SubscriptionProduct { +func NewSubscriptionProduct(deliveryMethod SubscriptionProductGetDeliveryMethodArgType, lifecycleState SubscriptionProductGetLifecycleStateArgType, priceType SubscriptionProductGetPriceTypeArgType, pricingPlan SubscriptionProductGetPricingPlanArgType, productId SubscriptionProductGetProductIdArgType, productName SubscriptionProductGetProductNameArgType, vendorName SubscriptionProductGetVendorNameArgType, vendorWebsiteUrl SubscriptionProductGetVendorWebsiteUrlArgType) *SubscriptionProduct { this := SubscriptionProduct{} - this.DeliveryMethod = deliveryMethod - this.LifecycleState = lifecycleState - this.PriceType = priceType - this.PricingPlan = pricingPlan - this.ProductId = productId - this.ProductName = productName - this.VendorName = vendorName - this.VendorWebsiteUrl = vendorWebsiteUrl + setSubscriptionProductGetDeliveryMethodAttributeType(&this.DeliveryMethod, deliveryMethod) + setSubscriptionProductGetLifecycleStateAttributeType(&this.LifecycleState, lifecycleState) + setSubscriptionProductGetPriceTypeAttributeType(&this.PriceType, priceType) + setSubscriptionProductGetPricingPlanAttributeType(&this.PricingPlan, pricingPlan) + setSubscriptionProductGetProductIdAttributeType(&this.ProductId, productId) + setSubscriptionProductGetProductNameAttributeType(&this.ProductName, productName) + setSubscriptionProductGetVendorNameAttributeType(&this.VendorName, vendorName) + setSubscriptionProductGetVendorWebsiteUrlAttributeType(&this.VendorWebsiteUrl, vendorWebsiteUrl) return &this } @@ -73,207 +238,167 @@ func NewSubscriptionProductWithDefaults() *SubscriptionProduct { } // GetDeliveryMethod returns the DeliveryMethod field value -func (o *SubscriptionProduct) GetDeliveryMethod() *string { - if o == nil || IsNil(o.DeliveryMethod) { - var ret *string - return ret - } - - return o.DeliveryMethod +func (o *SubscriptionProduct) GetDeliveryMethod() (ret SubscriptionProductGetDeliveryMethodRetType) { + ret, _ = o.GetDeliveryMethodOk() + return ret } // GetDeliveryMethodOk returns a tuple with the DeliveryMethod field value // and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetDeliveryMethodOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DeliveryMethod, true +func (o *SubscriptionProduct) GetDeliveryMethodOk() (ret SubscriptionProductGetDeliveryMethodRetType, ok bool) { + return getSubscriptionProductGetDeliveryMethodAttributeTypeOk(o.DeliveryMethod) } // SetDeliveryMethod sets field value -func (o *SubscriptionProduct) SetDeliveryMethod(v *string) { - o.DeliveryMethod = v +func (o *SubscriptionProduct) SetDeliveryMethod(v SubscriptionProductGetDeliveryMethodRetType) { + setSubscriptionProductGetDeliveryMethodAttributeType(&o.DeliveryMethod, v) } // GetLifecycleState returns the LifecycleState field value -func (o *SubscriptionProduct) GetLifecycleState() *string { - if o == nil || IsNil(o.LifecycleState) { - var ret *string - return ret - } - - return o.LifecycleState +func (o *SubscriptionProduct) GetLifecycleState() (ret SubscriptionProductGetLifecycleStateRetType) { + ret, _ = o.GetLifecycleStateOk() + return ret } // GetLifecycleStateOk returns a tuple with the LifecycleState field value // and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetLifecycleStateOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.LifecycleState, true +func (o *SubscriptionProduct) GetLifecycleStateOk() (ret SubscriptionProductGetLifecycleStateRetType, ok bool) { + return getSubscriptionProductGetLifecycleStateAttributeTypeOk(o.LifecycleState) } // SetLifecycleState sets field value -func (o *SubscriptionProduct) SetLifecycleState(v *string) { - o.LifecycleState = v +func (o *SubscriptionProduct) SetLifecycleState(v SubscriptionProductGetLifecycleStateRetType) { + setSubscriptionProductGetLifecycleStateAttributeType(&o.LifecycleState, v) } // GetPriceType returns the PriceType field value -func (o *SubscriptionProduct) GetPriceType() *string { - if o == nil || IsNil(o.PriceType) { - var ret *string - return ret - } - - return o.PriceType +func (o *SubscriptionProduct) GetPriceType() (ret SubscriptionProductGetPriceTypeRetType) { + ret, _ = o.GetPriceTypeOk() + return ret } // GetPriceTypeOk returns a tuple with the PriceType field value // and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetPriceTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.PriceType, true +func (o *SubscriptionProduct) GetPriceTypeOk() (ret SubscriptionProductGetPriceTypeRetType, ok bool) { + return getSubscriptionProductGetPriceTypeAttributeTypeOk(o.PriceType) } // SetPriceType sets field value -func (o *SubscriptionProduct) SetPriceType(v *string) { - o.PriceType = v +func (o *SubscriptionProduct) SetPriceType(v SubscriptionProductGetPriceTypeRetType) { + setSubscriptionProductGetPriceTypeAttributeType(&o.PriceType, v) } // GetPricingPlan returns the PricingPlan field value -func (o *SubscriptionProduct) GetPricingPlan() *string { - if o == nil || IsNil(o.PricingPlan) { - var ret *string - return ret - } - - return o.PricingPlan +func (o *SubscriptionProduct) GetPricingPlan() (ret SubscriptionProductGetPricingPlanRetType) { + ret, _ = o.GetPricingPlanOk() + return ret } // GetPricingPlanOk returns a tuple with the PricingPlan field value // and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetPricingPlanOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.PricingPlan, true +func (o *SubscriptionProduct) GetPricingPlanOk() (ret SubscriptionProductGetPricingPlanRetType, ok bool) { + return getSubscriptionProductGetPricingPlanAttributeTypeOk(o.PricingPlan) } // SetPricingPlan sets field value -func (o *SubscriptionProduct) SetPricingPlan(v *string) { - o.PricingPlan = v +func (o *SubscriptionProduct) SetPricingPlan(v SubscriptionProductGetPricingPlanRetType) { + setSubscriptionProductGetPricingPlanAttributeType(&o.PricingPlan, v) } // GetProductId returns the ProductId field value -func (o *SubscriptionProduct) GetProductId() *string { - if o == nil || IsNil(o.ProductId) { - var ret *string - return ret - } - - return o.ProductId +func (o *SubscriptionProduct) GetProductId() (ret SubscriptionProductGetProductIdRetType) { + 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 *SubscriptionProduct) GetProductIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ProductId, true +func (o *SubscriptionProduct) GetProductIdOk() (ret SubscriptionProductGetProductIdRetType, ok bool) { + return getSubscriptionProductGetProductIdAttributeTypeOk(o.ProductId) } // SetProductId sets field value -func (o *SubscriptionProduct) SetProductId(v *string) { - o.ProductId = v +func (o *SubscriptionProduct) SetProductId(v SubscriptionProductGetProductIdRetType) { + setSubscriptionProductGetProductIdAttributeType(&o.ProductId, v) } // GetProductName returns the ProductName field value -func (o *SubscriptionProduct) GetProductName() *string { - if o == nil || IsNil(o.ProductName) { - var ret *string - return ret - } - - return o.ProductName +func (o *SubscriptionProduct) GetProductName() (ret SubscriptionProductGetProductNameRetType) { + ret, _ = o.GetProductNameOk() + return ret } // GetProductNameOk returns a tuple with the ProductName field value // and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetProductNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ProductName, true +func (o *SubscriptionProduct) GetProductNameOk() (ret SubscriptionProductGetProductNameRetType, ok bool) { + return getSubscriptionProductGetProductNameAttributeTypeOk(o.ProductName) } // SetProductName sets field value -func (o *SubscriptionProduct) SetProductName(v *string) { - o.ProductName = v +func (o *SubscriptionProduct) SetProductName(v SubscriptionProductGetProductNameRetType) { + setSubscriptionProductGetProductNameAttributeType(&o.ProductName, v) } // GetVendorName returns the VendorName field value -func (o *SubscriptionProduct) GetVendorName() *string { - if o == nil || IsNil(o.VendorName) { - var ret *string - return ret - } - - return o.VendorName +func (o *SubscriptionProduct) GetVendorName() (ret SubscriptionProductGetVendorNameRetType) { + ret, _ = o.GetVendorNameOk() + return ret } // GetVendorNameOk returns a tuple with the VendorName field value // and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetVendorNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.VendorName, true +func (o *SubscriptionProduct) GetVendorNameOk() (ret SubscriptionProductGetVendorNameRetType, ok bool) { + return getSubscriptionProductGetVendorNameAttributeTypeOk(o.VendorName) } // SetVendorName sets field value -func (o *SubscriptionProduct) SetVendorName(v *string) { - o.VendorName = v +func (o *SubscriptionProduct) SetVendorName(v SubscriptionProductGetVendorNameRetType) { + setSubscriptionProductGetVendorNameAttributeType(&o.VendorName, v) } // GetVendorWebsiteUrl returns the VendorWebsiteUrl field value -func (o *SubscriptionProduct) GetVendorWebsiteUrl() *string { - if o == nil || IsNil(o.VendorWebsiteUrl) { - var ret *string - return ret - } - - return o.VendorWebsiteUrl +func (o *SubscriptionProduct) GetVendorWebsiteUrl() (ret SubscriptionProductGetVendorWebsiteUrlRetType) { + ret, _ = o.GetVendorWebsiteUrlOk() + return ret } // GetVendorWebsiteUrlOk returns a tuple with the VendorWebsiteUrl field value // and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetVendorWebsiteUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.VendorWebsiteUrl, true +func (o *SubscriptionProduct) GetVendorWebsiteUrlOk() (ret SubscriptionProductGetVendorWebsiteUrlRetType, ok bool) { + return getSubscriptionProductGetVendorWebsiteUrlAttributeTypeOk(o.VendorWebsiteUrl) } // SetVendorWebsiteUrl sets field value -func (o *SubscriptionProduct) SetVendorWebsiteUrl(v *string) { - o.VendorWebsiteUrl = v +func (o *SubscriptionProduct) SetVendorWebsiteUrl(v SubscriptionProductGetVendorWebsiteUrlRetType) { + setSubscriptionProductGetVendorWebsiteUrlAttributeType(&o.VendorWebsiteUrl, v) } func (o SubscriptionProduct) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["deliveryMethod"] = o.DeliveryMethod - toSerialize["lifecycleState"] = o.LifecycleState - toSerialize["priceType"] = o.PriceType - toSerialize["pricingPlan"] = o.PricingPlan - toSerialize["productId"] = o.ProductId - toSerialize["productName"] = o.ProductName - toSerialize["vendorName"] = o.VendorName - toSerialize["vendorWebsiteUrl"] = o.VendorWebsiteUrl + if val, ok := getSubscriptionProductGetDeliveryMethodAttributeTypeOk(o.DeliveryMethod); ok { + toSerialize["DeliveryMethod"] = val + } + if val, ok := getSubscriptionProductGetLifecycleStateAttributeTypeOk(o.LifecycleState); ok { + toSerialize["LifecycleState"] = val + } + if val, ok := getSubscriptionProductGetPriceTypeAttributeTypeOk(o.PriceType); ok { + toSerialize["PriceType"] = val + } + if val, ok := getSubscriptionProductGetPricingPlanAttributeTypeOk(o.PricingPlan); ok { + toSerialize["PricingPlan"] = val + } + if val, ok := getSubscriptionProductGetProductIdAttributeTypeOk(o.ProductId); ok { + toSerialize["ProductId"] = val + } + if val, ok := getSubscriptionProductGetProductNameAttributeTypeOk(o.ProductName); ok { + toSerialize["ProductName"] = val + } + if val, ok := getSubscriptionProductGetVendorNameAttributeTypeOk(o.VendorName); ok { + toSerialize["VendorName"] = val + } + if val, ok := getSubscriptionProductGetVendorWebsiteUrlAttributeTypeOk(o.VendorWebsiteUrl); ok { + toSerialize["VendorWebsiteUrl"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_suggest_product.go b/services/stackitmarketplace/model_suggest_product.go index 446d6470e..4887527dd 100644 --- a/services/stackitmarketplace/model_suggest_product.go +++ b/services/stackitmarketplace/model_suggest_product.go @@ -17,13 +17,53 @@ import ( // checks if the SuggestProduct type satisfies the MappedNullable interface at compile time var _ MappedNullable = &SuggestProduct{} +/* + types and functions for suggestProduct +*/ + +// isModel +type SuggestProductGetSuggestProductAttributeType = *SuggestProductSuggestProduct +type SuggestProductGetSuggestProductArgType = SuggestProductSuggestProduct +type SuggestProductGetSuggestProductRetType = SuggestProductSuggestProduct + +func getSuggestProductGetSuggestProductAttributeTypeOk(arg SuggestProductGetSuggestProductAttributeType) (ret SuggestProductGetSuggestProductRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSuggestProductGetSuggestProductAttributeType(arg *SuggestProductGetSuggestProductAttributeType, val SuggestProductGetSuggestProductRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isEnumRef +type SuggestProductGetTypeAttributeType = *string +type SuggestProductGetTypeArgType = string +type SuggestProductGetTypeRetType = string + +func getSuggestProductGetTypeAttributeTypeOk(arg SuggestProductGetTypeAttributeType) (ret SuggestProductGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSuggestProductGetTypeAttributeType(arg *SuggestProductGetTypeAttributeType, val SuggestProductGetTypeRetType) { + *arg = &val +} + // SuggestProduct Suggest a product. type SuggestProduct struct { // REQUIRED - SuggestProduct *SuggestProductSuggestProduct `json:"suggestProduct"` + SuggestProduct SuggestProductGetSuggestProductAttributeType `json:"suggestProduct"` // The form type. // REQUIRED - Type *string `json:"type"` + Type SuggestProductGetTypeAttributeType `json:"type"` } type _SuggestProduct SuggestProduct @@ -32,10 +72,10 @@ type _SuggestProduct SuggestProduct // 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 NewSuggestProduct(suggestProduct *SuggestProductSuggestProduct, type_ *string) *SuggestProduct { +func NewSuggestProduct(suggestProduct SuggestProductGetSuggestProductArgType, type_ SuggestProductGetTypeArgType) *SuggestProduct { this := SuggestProduct{} - this.SuggestProduct = suggestProduct - this.Type = type_ + setSuggestProductGetSuggestProductAttributeType(&this.SuggestProduct, suggestProduct) + setSuggestProductGetTypeAttributeType(&this.Type, type_) return &this } @@ -48,57 +88,47 @@ func NewSuggestProductWithDefaults() *SuggestProduct { } // GetSuggestProduct returns the SuggestProduct field value -func (o *SuggestProduct) GetSuggestProduct() *SuggestProductSuggestProduct { - if o == nil || IsNil(o.SuggestProduct) { - var ret *SuggestProductSuggestProduct - return ret - } - - return o.SuggestProduct +func (o *SuggestProduct) GetSuggestProduct() (ret SuggestProductGetSuggestProductRetType) { + ret, _ = o.GetSuggestProductOk() + return ret } // GetSuggestProductOk returns a tuple with the SuggestProduct field value // and a boolean to check if the value has been set. -func (o *SuggestProduct) GetSuggestProductOk() (*SuggestProductSuggestProduct, bool) { - if o == nil { - return nil, false - } - return o.SuggestProduct, true +func (o *SuggestProduct) GetSuggestProductOk() (ret SuggestProductGetSuggestProductRetType, ok bool) { + return getSuggestProductGetSuggestProductAttributeTypeOk(o.SuggestProduct) } // SetSuggestProduct sets field value -func (o *SuggestProduct) SetSuggestProduct(v *SuggestProductSuggestProduct) { - o.SuggestProduct = v +func (o *SuggestProduct) SetSuggestProduct(v SuggestProductGetSuggestProductRetType) { + setSuggestProductGetSuggestProductAttributeType(&o.SuggestProduct, v) } // GetType returns the Type field value -func (o *SuggestProduct) GetType() *string { - if o == nil || IsNil(o.Type) { - var ret *string - return ret - } - - return o.Type +func (o *SuggestProduct) GetType() (ret SuggestProductGetTypeRetType) { + 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 *SuggestProduct) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Type, true +func (o *SuggestProduct) GetTypeOk() (ret SuggestProductGetTypeRetType, ok bool) { + return getSuggestProductGetTypeAttributeTypeOk(o.Type) } // SetType sets field value -func (o *SuggestProduct) SetType(v *string) { - o.Type = v +func (o *SuggestProduct) SetType(v SuggestProductGetTypeRetType) { + setSuggestProductGetTypeAttributeType(&o.Type, v) } func (o SuggestProduct) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["suggestProduct"] = o.SuggestProduct - toSerialize["type"] = o.Type + if val, ok := getSuggestProductGetSuggestProductAttributeTypeOk(o.SuggestProduct); ok { + toSerialize["SuggestProduct"] = val + } + if val, ok := getSuggestProductGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/model_suggest_product_suggest_product.go b/services/stackitmarketplace/model_suggest_product_suggest_product.go index 919ae69ec..3af962546 100644 --- a/services/stackitmarketplace/model_suggest_product_suggest_product.go +++ b/services/stackitmarketplace/model_suggest_product_suggest_product.go @@ -17,19 +17,103 @@ import ( // checks if the SuggestProductSuggestProduct type satisfies the MappedNullable interface at compile time var _ MappedNullable = &SuggestProductSuggestProduct{} +/* + types and functions for companyName +*/ + +// isNotNullableString +type SuggestProductSuggestProductGetCompanyNameAttributeType = *string + +func getSuggestProductSuggestProductGetCompanyNameAttributeTypeOk(arg SuggestProductSuggestProductGetCompanyNameAttributeType) (ret SuggestProductSuggestProductGetCompanyNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSuggestProductSuggestProductGetCompanyNameAttributeType(arg *SuggestProductSuggestProductGetCompanyNameAttributeType, val SuggestProductSuggestProductGetCompanyNameRetType) { + *arg = &val +} + +type SuggestProductSuggestProductGetCompanyNameArgType = string +type SuggestProductSuggestProductGetCompanyNameRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +type SuggestProductSuggestProductGetMessageAttributeType = *string + +func getSuggestProductSuggestProductGetMessageAttributeTypeOk(arg SuggestProductSuggestProductGetMessageAttributeType) (ret SuggestProductSuggestProductGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSuggestProductSuggestProductGetMessageAttributeType(arg *SuggestProductSuggestProductGetMessageAttributeType, val SuggestProductSuggestProductGetMessageRetType) { + *arg = &val +} + +type SuggestProductSuggestProductGetMessageArgType = string +type SuggestProductSuggestProductGetMessageRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type SuggestProductSuggestProductGetNameAttributeType = *string + +func getSuggestProductSuggestProductGetNameAttributeTypeOk(arg SuggestProductSuggestProductGetNameAttributeType) (ret SuggestProductSuggestProductGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSuggestProductSuggestProductGetNameAttributeType(arg *SuggestProductSuggestProductGetNameAttributeType, val SuggestProductSuggestProductGetNameRetType) { + *arg = &val +} + +type SuggestProductSuggestProductGetNameArgType = string +type SuggestProductSuggestProductGetNameRetType = string + +/* + types and functions for url +*/ + +// isNotNullableString +type SuggestProductSuggestProductGetUrlAttributeType = *string + +func getSuggestProductSuggestProductGetUrlAttributeTypeOk(arg SuggestProductSuggestProductGetUrlAttributeType) (ret SuggestProductSuggestProductGetUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSuggestProductSuggestProductGetUrlAttributeType(arg *SuggestProductSuggestProductGetUrlAttributeType, val SuggestProductSuggestProductGetUrlRetType) { + *arg = &val +} + +type SuggestProductSuggestProductGetUrlArgType = string +type SuggestProductSuggestProductGetUrlRetType = string + // SuggestProductSuggestProduct struct for SuggestProductSuggestProduct type SuggestProductSuggestProduct struct { // The suggested product's company name. // REQUIRED - CompanyName *string `json:"companyName"` + CompanyName SuggestProductSuggestProductGetCompanyNameAttributeType `json:"companyName"` // An additional message. - Message *string `json:"message,omitempty"` + Message SuggestProductSuggestProductGetMessageAttributeType `json:"message,omitempty"` // The suggested product name. // REQUIRED - Name *string `json:"name"` + Name SuggestProductSuggestProductGetNameAttributeType `json:"name"` // The suggested product's website URL. // REQUIRED - Url *string `json:"url"` + Url SuggestProductSuggestProductGetUrlAttributeType `json:"url"` } type _SuggestProductSuggestProduct SuggestProductSuggestProduct @@ -38,11 +122,11 @@ type _SuggestProductSuggestProduct SuggestProductSuggestProduct // 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 NewSuggestProductSuggestProduct(companyName *string, name *string, url *string) *SuggestProductSuggestProduct { +func NewSuggestProductSuggestProduct(companyName SuggestProductSuggestProductGetCompanyNameArgType, name SuggestProductSuggestProductGetNameArgType, url SuggestProductSuggestProductGetUrlArgType) *SuggestProductSuggestProduct { this := SuggestProductSuggestProduct{} - this.CompanyName = companyName - this.Name = name - this.Url = url + setSuggestProductSuggestProductGetCompanyNameAttributeType(&this.CompanyName, companyName) + setSuggestProductSuggestProductGetNameAttributeType(&this.Name, name) + setSuggestProductSuggestProductGetUrlAttributeType(&this.Url, url) return &this } @@ -55,117 +139,93 @@ func NewSuggestProductSuggestProductWithDefaults() *SuggestProductSuggestProduct } // GetCompanyName returns the CompanyName field value -func (o *SuggestProductSuggestProduct) GetCompanyName() *string { - if o == nil || IsNil(o.CompanyName) { - var ret *string - return ret - } - - return o.CompanyName +func (o *SuggestProductSuggestProduct) GetCompanyName() (ret SuggestProductSuggestProductGetCompanyNameRetType) { + 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 *SuggestProductSuggestProduct) GetCompanyNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CompanyName, true +func (o *SuggestProductSuggestProduct) GetCompanyNameOk() (ret SuggestProductSuggestProductGetCompanyNameRetType, ok bool) { + return getSuggestProductSuggestProductGetCompanyNameAttributeTypeOk(o.CompanyName) } // SetCompanyName sets field value -func (o *SuggestProductSuggestProduct) SetCompanyName(v *string) { - o.CompanyName = v +func (o *SuggestProductSuggestProduct) SetCompanyName(v SuggestProductSuggestProductGetCompanyNameRetType) { + setSuggestProductSuggestProductGetCompanyNameAttributeType(&o.CompanyName, v) } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *SuggestProductSuggestProduct) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - return o.Message +func (o *SuggestProductSuggestProduct) GetMessage() (res SuggestProductSuggestProductGetMessageRetType) { + res, _ = o.GetMessageOk() + return } // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SuggestProductSuggestProduct) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true +func (o *SuggestProductSuggestProduct) GetMessageOk() (ret SuggestProductSuggestProductGetMessageRetType, ok bool) { + return getSuggestProductSuggestProductGetMessageAttributeTypeOk(o.Message) } // HasMessage returns a boolean if a field has been set. func (o *SuggestProductSuggestProduct) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false + _, ok := o.GetMessageOk() + return ok } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *SuggestProductSuggestProduct) SetMessage(v *string) { - o.Message = v +func (o *SuggestProductSuggestProduct) SetMessage(v SuggestProductSuggestProductGetMessageRetType) { + setSuggestProductSuggestProductGetMessageAttributeType(&o.Message, v) } // GetName returns the Name field value -func (o *SuggestProductSuggestProduct) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *SuggestProductSuggestProduct) GetName() (ret SuggestProductSuggestProductGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *SuggestProductSuggestProduct) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true +func (o *SuggestProductSuggestProduct) GetNameOk() (ret SuggestProductSuggestProductGetNameRetType, ok bool) { + return getSuggestProductSuggestProductGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *SuggestProductSuggestProduct) SetName(v *string) { - o.Name = v +func (o *SuggestProductSuggestProduct) SetName(v SuggestProductSuggestProductGetNameRetType) { + setSuggestProductSuggestProductGetNameAttributeType(&o.Name, v) } // GetUrl returns the Url field value -func (o *SuggestProductSuggestProduct) GetUrl() *string { - if o == nil || IsNil(o.Url) { - var ret *string - return ret - } - - return o.Url +func (o *SuggestProductSuggestProduct) GetUrl() (ret SuggestProductSuggestProductGetUrlRetType) { + ret, _ = o.GetUrlOk() + return ret } // GetUrlOk returns a tuple with the Url field value // and a boolean to check if the value has been set. -func (o *SuggestProductSuggestProduct) GetUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Url, true +func (o *SuggestProductSuggestProduct) GetUrlOk() (ret SuggestProductSuggestProductGetUrlRetType, ok bool) { + return getSuggestProductSuggestProductGetUrlAttributeTypeOk(o.Url) } // SetUrl sets field value -func (o *SuggestProductSuggestProduct) SetUrl(v *string) { - o.Url = v +func (o *SuggestProductSuggestProduct) SetUrl(v SuggestProductSuggestProductGetUrlRetType) { + setSuggestProductSuggestProductGetUrlAttributeType(&o.Url, v) } func (o SuggestProductSuggestProduct) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["companyName"] = o.CompanyName - if !IsNil(o.Message) { - toSerialize["message"] = o.Message + if val, ok := getSuggestProductSuggestProductGetCompanyNameAttributeTypeOk(o.CompanyName); ok { + toSerialize["CompanyName"] = val + } + if val, ok := getSuggestProductSuggestProductGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + if val, ok := getSuggestProductSuggestProductGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getSuggestProductSuggestProductGetUrlAttributeTypeOk(o.Url); ok { + toSerialize["Url"] = val } - toSerialize["name"] = o.Name - toSerialize["url"] = o.Url return toSerialize, nil } diff --git a/services/stackitmarketplace/model_vendor_subscription.go b/services/stackitmarketplace/model_vendor_subscription.go index 273968682..71346cb75 100644 --- a/services/stackitmarketplace/model_vendor_subscription.go +++ b/services/stackitmarketplace/model_vendor_subscription.go @@ -17,19 +17,101 @@ import ( // checks if the VendorSubscription type satisfies the MappedNullable interface at compile time var _ MappedNullable = &VendorSubscription{} +/* + types and functions for lifecycleState +*/ + +// isEnumRef +type VendorSubscriptionGetLifecycleStateAttributeType = *string +type VendorSubscriptionGetLifecycleStateArgType = string +type VendorSubscriptionGetLifecycleStateRetType = string + +func getVendorSubscriptionGetLifecycleStateAttributeTypeOk(arg VendorSubscriptionGetLifecycleStateAttributeType) (ret VendorSubscriptionGetLifecycleStateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setVendorSubscriptionGetLifecycleStateAttributeType(arg *VendorSubscriptionGetLifecycleStateAttributeType, val VendorSubscriptionGetLifecycleStateRetType) { + *arg = &val +} + +/* + types and functions for product +*/ + +// isModel +type VendorSubscriptionGetProductAttributeType = *SubscriptionProduct +type VendorSubscriptionGetProductArgType = SubscriptionProduct +type VendorSubscriptionGetProductRetType = SubscriptionProduct + +func getVendorSubscriptionGetProductAttributeTypeOk(arg VendorSubscriptionGetProductAttributeType) (ret VendorSubscriptionGetProductRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setVendorSubscriptionGetProductAttributeType(arg *VendorSubscriptionGetProductAttributeType, val VendorSubscriptionGetProductRetType) { + *arg = &val +} + +/* + types and functions for projectId +*/ + +// isNotNullableString +type VendorSubscriptionGetProjectIdAttributeType = *string + +func getVendorSubscriptionGetProjectIdAttributeTypeOk(arg VendorSubscriptionGetProjectIdAttributeType) (ret VendorSubscriptionGetProjectIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setVendorSubscriptionGetProjectIdAttributeType(arg *VendorSubscriptionGetProjectIdAttributeType, val VendorSubscriptionGetProjectIdRetType) { + *arg = &val +} + +type VendorSubscriptionGetProjectIdArgType = string +type VendorSubscriptionGetProjectIdRetType = string + +/* + types and functions for subscriptionId +*/ + +// isNotNullableString +type VendorSubscriptionGetSubscriptionIdAttributeType = *string + +func getVendorSubscriptionGetSubscriptionIdAttributeTypeOk(arg VendorSubscriptionGetSubscriptionIdAttributeType) (ret VendorSubscriptionGetSubscriptionIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setVendorSubscriptionGetSubscriptionIdAttributeType(arg *VendorSubscriptionGetSubscriptionIdAttributeType, val VendorSubscriptionGetSubscriptionIdRetType) { + *arg = &val +} + +type VendorSubscriptionGetSubscriptionIdArgType = string +type VendorSubscriptionGetSubscriptionIdRetType = string + // VendorSubscription struct for VendorSubscription type VendorSubscription struct { // Lifecycle state of the subscription. // REQUIRED - LifecycleState *string `json:"lifecycleState"` + LifecycleState VendorSubscriptionGetLifecycleStateAttributeType `json:"lifecycleState"` // REQUIRED - Product *SubscriptionProduct `json:"product"` + Product VendorSubscriptionGetProductAttributeType `json:"product"` // The associated consumer project ID. // REQUIRED - ProjectId *string `json:"projectId"` + ProjectId VendorSubscriptionGetProjectIdAttributeType `json:"projectId"` // The subscription ID. // REQUIRED - SubscriptionId *string `json:"subscriptionId"` + SubscriptionId VendorSubscriptionGetSubscriptionIdAttributeType `json:"subscriptionId"` } type _VendorSubscription VendorSubscription @@ -38,12 +120,12 @@ type _VendorSubscription VendorSubscription // 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 NewVendorSubscription(lifecycleState *string, product *SubscriptionProduct, projectId *string, subscriptionId *string) *VendorSubscription { +func NewVendorSubscription(lifecycleState VendorSubscriptionGetLifecycleStateArgType, product VendorSubscriptionGetProductArgType, projectId VendorSubscriptionGetProjectIdArgType, subscriptionId VendorSubscriptionGetSubscriptionIdArgType) *VendorSubscription { this := VendorSubscription{} - this.LifecycleState = lifecycleState - this.Product = product - this.ProjectId = projectId - this.SubscriptionId = subscriptionId + setVendorSubscriptionGetLifecycleStateAttributeType(&this.LifecycleState, lifecycleState) + setVendorSubscriptionGetProductAttributeType(&this.Product, product) + setVendorSubscriptionGetProjectIdAttributeType(&this.ProjectId, projectId) + setVendorSubscriptionGetSubscriptionIdAttributeType(&this.SubscriptionId, subscriptionId) return &this } @@ -56,107 +138,87 @@ func NewVendorSubscriptionWithDefaults() *VendorSubscription { } // GetLifecycleState returns the LifecycleState field value -func (o *VendorSubscription) GetLifecycleState() *string { - if o == nil || IsNil(o.LifecycleState) { - var ret *string - return ret - } - - return o.LifecycleState +func (o *VendorSubscription) GetLifecycleState() (ret VendorSubscriptionGetLifecycleStateRetType) { + ret, _ = o.GetLifecycleStateOk() + return ret } // GetLifecycleStateOk returns a tuple with the LifecycleState field value // and a boolean to check if the value has been set. -func (o *VendorSubscription) GetLifecycleStateOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.LifecycleState, true +func (o *VendorSubscription) GetLifecycleStateOk() (ret VendorSubscriptionGetLifecycleStateRetType, ok bool) { + return getVendorSubscriptionGetLifecycleStateAttributeTypeOk(o.LifecycleState) } // SetLifecycleState sets field value -func (o *VendorSubscription) SetLifecycleState(v *string) { - o.LifecycleState = v +func (o *VendorSubscription) SetLifecycleState(v VendorSubscriptionGetLifecycleStateRetType) { + setVendorSubscriptionGetLifecycleStateAttributeType(&o.LifecycleState, v) } // GetProduct returns the Product field value -func (o *VendorSubscription) GetProduct() *SubscriptionProduct { - if o == nil || IsNil(o.Product) { - var ret *SubscriptionProduct - return ret - } - - return o.Product +func (o *VendorSubscription) GetProduct() (ret VendorSubscriptionGetProductRetType) { + ret, _ = o.GetProductOk() + return ret } // GetProductOk returns a tuple with the Product field value // and a boolean to check if the value has been set. -func (o *VendorSubscription) GetProductOk() (*SubscriptionProduct, bool) { - if o == nil { - return nil, false - } - return o.Product, true +func (o *VendorSubscription) GetProductOk() (ret VendorSubscriptionGetProductRetType, ok bool) { + return getVendorSubscriptionGetProductAttributeTypeOk(o.Product) } // SetProduct sets field value -func (o *VendorSubscription) SetProduct(v *SubscriptionProduct) { - o.Product = v +func (o *VendorSubscription) SetProduct(v VendorSubscriptionGetProductRetType) { + setVendorSubscriptionGetProductAttributeType(&o.Product, v) } // GetProjectId returns the ProjectId field value -func (o *VendorSubscription) GetProjectId() *string { - if o == nil || IsNil(o.ProjectId) { - var ret *string - return ret - } - - return o.ProjectId +func (o *VendorSubscription) GetProjectId() (ret VendorSubscriptionGetProjectIdRetType) { + ret, _ = o.GetProjectIdOk() + return ret } // GetProjectIdOk returns a tuple with the ProjectId field value // and a boolean to check if the value has been set. -func (o *VendorSubscription) GetProjectIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ProjectId, true +func (o *VendorSubscription) GetProjectIdOk() (ret VendorSubscriptionGetProjectIdRetType, ok bool) { + return getVendorSubscriptionGetProjectIdAttributeTypeOk(o.ProjectId) } // SetProjectId sets field value -func (o *VendorSubscription) SetProjectId(v *string) { - o.ProjectId = v +func (o *VendorSubscription) SetProjectId(v VendorSubscriptionGetProjectIdRetType) { + setVendorSubscriptionGetProjectIdAttributeType(&o.ProjectId, v) } // GetSubscriptionId returns the SubscriptionId field value -func (o *VendorSubscription) GetSubscriptionId() *string { - if o == nil || IsNil(o.SubscriptionId) { - var ret *string - return ret - } - - return o.SubscriptionId +func (o *VendorSubscription) GetSubscriptionId() (ret VendorSubscriptionGetSubscriptionIdRetType) { + ret, _ = o.GetSubscriptionIdOk() + return ret } // GetSubscriptionIdOk returns a tuple with the SubscriptionId field value // and a boolean to check if the value has been set. -func (o *VendorSubscription) GetSubscriptionIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.SubscriptionId, true +func (o *VendorSubscription) GetSubscriptionIdOk() (ret VendorSubscriptionGetSubscriptionIdRetType, ok bool) { + return getVendorSubscriptionGetSubscriptionIdAttributeTypeOk(o.SubscriptionId) } // SetSubscriptionId sets field value -func (o *VendorSubscription) SetSubscriptionId(v *string) { - o.SubscriptionId = v +func (o *VendorSubscription) SetSubscriptionId(v VendorSubscriptionGetSubscriptionIdRetType) { + setVendorSubscriptionGetSubscriptionIdAttributeType(&o.SubscriptionId, v) } func (o VendorSubscription) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["lifecycleState"] = o.LifecycleState - toSerialize["product"] = o.Product - toSerialize["projectId"] = o.ProjectId - toSerialize["subscriptionId"] = o.SubscriptionId + if val, ok := getVendorSubscriptionGetLifecycleStateAttributeTypeOk(o.LifecycleState); ok { + toSerialize["LifecycleState"] = val + } + if val, ok := getVendorSubscriptionGetProductAttributeTypeOk(o.Product); ok { + toSerialize["Product"] = val + } + if val, ok := getVendorSubscriptionGetProjectIdAttributeTypeOk(o.ProjectId); ok { + toSerialize["ProjectId"] = val + } + if val, ok := getVendorSubscriptionGetSubscriptionIdAttributeTypeOk(o.SubscriptionId); ok { + toSerialize["SubscriptionId"] = val + } return toSerialize, nil } diff --git a/services/stackitmarketplace/utils.go b/services/stackitmarketplace/utils.go index 089879e2d..9041f1beb 100644 --- a/services/stackitmarketplace/utils.go +++ b/services/stackitmarketplace/utils.go @@ -40,6 +40,29 @@ func PtrString(v string) *string { return &v } // PtrTime is helper routine that returns a pointer to given Time value. func PtrTime(v time.Time) *time.Time { return &v } +type NullableValue[T any] struct { + value *T + isSet bool +} + +func (v NullableValue[T]) Get() *T { + return v.value +} + +func (v *NullableValue[T]) Set(val *T) { + v.value = val + v.isSet = true +} + +func (v NullableValue[T]) IsSet() bool { + return v.isSet +} + +func (v *NullableValue[T]) Unset() { + v.value = nil + v.isSet = false +} + type NullableBool struct { value *bool isSet bool @@ -333,6 +356,9 @@ func IsNil(i interface{}) bool { if i == nil { return true } + if t, ok := i.(interface{ IsSet() bool }); ok { + return !t.IsSet() + } switch reflect.TypeOf(i).Kind() { case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: return reflect.ValueOf(i).IsNil()