diff --git a/services/serviceenablement/CHANGELOG.md b/services/serviceenablement/CHANGELOG.md index 256602b00..6aec0ff30 100644 --- a/services/serviceenablement/CHANGELOG.md +++ b/services/serviceenablement/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.3.0 (2024-10-14) + +- **Feature:** Add support for nullable models + ## v0.2.0 (2024-07-12) - **Feature**: New waiters `EnableServiceWaitHandler` and `DisableServiceWaitHandler` for async operations `EnableService` and `DisableService`, respectively. diff --git a/services/serviceenablement/model_action_error.go b/services/serviceenablement/model_action_error.go index 4c1a35bae..30e5789b2 100644 --- a/services/serviceenablement/model_action_error.go +++ b/services/serviceenablement/model_action_error.go @@ -10,6 +10,13 @@ API version: 1.1 package serviceenablement +import ( + "encoding/json" +) + +// checks if the ActionError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ActionError{} + // ActionError the last error for this service. type ActionError struct { // the last action which was triggered on this service @@ -19,3 +26,166 @@ type ActionError struct { // the error reason provided by the service Reason *string `json:"reason,omitempty"` } + +// NewActionError instantiates a new ActionError object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewActionError() *ActionError { + this := ActionError{} + return &this +} + +// NewActionErrorWithDefaults instantiates a new ActionError object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewActionErrorWithDefaults() *ActionError { + this := ActionError{} + return &this +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *ActionError) GetAction() *string { + if o == nil || IsNil(o.Action) { + var ret *string + return ret + } + return o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActionError) GetActionOk() (*string, bool) { + if o == nil || IsNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *ActionError) HasAction() bool { + if o != nil && !IsNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *ActionError) SetAction(v *string) { + o.Action = v +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *ActionError) GetCode() *string { + if o == nil || IsNil(o.Code) { + var ret *string + return ret + } + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActionError) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *ActionError) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *ActionError) SetCode(v *string) { + o.Code = v +} + +// GetReason returns the Reason field value if set, zero value otherwise. +func (o *ActionError) GetReason() *string { + if o == nil || IsNil(o.Reason) { + var ret *string + return ret + } + return o.Reason +} + +// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActionError) GetReasonOk() (*string, bool) { + if o == nil || IsNil(o.Reason) { + return nil, false + } + return o.Reason, true +} + +// HasReason returns a boolean if a field has been set. +func (o *ActionError) HasReason() bool { + if o != nil && !IsNil(o.Reason) { + return true + } + + return false +} + +// SetReason gets a reference to the given string and assigns it to the Reason field. +func (o *ActionError) SetReason(v *string) { + o.Reason = v +} + +func (o ActionError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Action) { + toSerialize["action"] = o.Action + } + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Reason) { + toSerialize["reason"] = o.Reason + } + return toSerialize, nil +} + +type NullableActionError struct { + value *ActionError + isSet bool +} + +func (v NullableActionError) Get() *ActionError { + return v.value +} + +func (v *NullableActionError) Set(val *ActionError) { + v.value = val + v.isSet = true +} + +func (v NullableActionError) IsSet() bool { + return v.isSet +} + +func (v *NullableActionError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableActionError(val *ActionError) *NullableActionError { + return &NullableActionError{value: val, isSet: true} +} + +func (v NullableActionError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableActionError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceenablement/model_cloud_service.go b/services/serviceenablement/model_cloud_service.go index c669390de..a28e1a609 100644 --- a/services/serviceenablement/model_cloud_service.go +++ b/services/serviceenablement/model_cloud_service.go @@ -10,6 +10,13 @@ API version: 1.1 package serviceenablement +import ( + "encoding/json" +) + +// checks if the CloudService type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CloudService{} + // CloudService struct for CloudService type CloudService struct { Dependencies *Dependencies `json:"dependencies,omitempty"` @@ -18,3 +25,205 @@ type CloudService struct { // the id of the service ServiceId *string `json:"serviceId,omitempty"` } + +// NewCloudService instantiates a new CloudService object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCloudService() *CloudService { + this := CloudService{} + var scope string = "PUBLIC" + this.Scope = &scope + return &this +} + +// NewCloudServiceWithDefaults instantiates a new CloudService object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCloudServiceWithDefaults() *CloudService { + this := CloudService{} + var scope string = "PUBLIC" + this.Scope = &scope + return &this +} + +// GetDependencies returns the Dependencies field value if set, zero value otherwise. +func (o *CloudService) GetDependencies() *Dependencies { + if o == nil || IsNil(o.Dependencies) { + var ret *Dependencies + return ret + } + return o.Dependencies +} + +// GetDependenciesOk returns a tuple with the Dependencies field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloudService) GetDependenciesOk() (*Dependencies, bool) { + if o == nil || IsNil(o.Dependencies) { + return nil, false + } + return o.Dependencies, true +} + +// HasDependencies returns a boolean if a field has been set. +func (o *CloudService) HasDependencies() bool { + if o != nil && !IsNil(o.Dependencies) { + return true + } + + return false +} + +// SetDependencies gets a reference to the given Dependencies and assigns it to the Dependencies field. +func (o *CloudService) SetDependencies(v *Dependencies) { + o.Dependencies = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CloudService) GetLabels() *map[string]string { + if o == nil || IsNil(o.Labels) { + var ret *map[string]string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloudService) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CloudService) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *CloudService) SetLabels(v *map[string]string) { + o.Labels = v +} + +// GetScope returns the Scope field value if set, zero value otherwise. +func (o *CloudService) GetScope() *string { + if o == nil || IsNil(o.Scope) { + var ret *string + return ret + } + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloudService) GetScopeOk() (*string, bool) { + if o == nil || IsNil(o.Scope) { + return nil, false + } + return o.Scope, true +} + +// HasScope returns a boolean if a field has been set. +func (o *CloudService) HasScope() bool { + if o != nil && !IsNil(o.Scope) { + return true + } + + return false +} + +// SetScope gets a reference to the given string and assigns it to the Scope field. +func (o *CloudService) SetScope(v *string) { + o.Scope = v +} + +// GetServiceId returns the ServiceId field value if set, zero value otherwise. +func (o *CloudService) GetServiceId() *string { + if o == nil || IsNil(o.ServiceId) { + var ret *string + return ret + } + return o.ServiceId +} + +// GetServiceIdOk returns a tuple with the ServiceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloudService) GetServiceIdOk() (*string, bool) { + if o == nil || IsNil(o.ServiceId) { + return nil, false + } + return o.ServiceId, true +} + +// HasServiceId returns a boolean if a field has been set. +func (o *CloudService) HasServiceId() bool { + if o != nil && !IsNil(o.ServiceId) { + return true + } + + return false +} + +// SetServiceId gets a reference to the given string and assigns it to the ServiceId field. +func (o *CloudService) SetServiceId(v *string) { + o.ServiceId = v +} + +func (o CloudService) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Dependencies) { + toSerialize["dependencies"] = o.Dependencies + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Scope) { + toSerialize["scope"] = o.Scope + } + if !IsNil(o.ServiceId) { + toSerialize["serviceId"] = o.ServiceId + } + return toSerialize, nil +} + +type NullableCloudService struct { + value *CloudService + isSet bool +} + +func (v NullableCloudService) Get() *CloudService { + return v.value +} + +func (v *NullableCloudService) Set(val *CloudService) { + v.value = val + v.isSet = true +} + +func (v NullableCloudService) IsSet() bool { + return v.isSet +} + +func (v *NullableCloudService) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCloudService(val *CloudService) *NullableCloudService { + return &NullableCloudService{value: val, isSet: true} +} + +func (v NullableCloudService) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCloudService) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceenablement/model_dependencies.go b/services/serviceenablement/model_dependencies.go index bc3bce3e0..4562b5b57 100644 --- a/services/serviceenablement/model_dependencies.go +++ b/services/serviceenablement/model_dependencies.go @@ -10,6 +10,13 @@ API version: 1.1 package serviceenablement +import ( + "encoding/json" +) + +// checks if the Dependencies type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Dependencies{} + // Dependencies struct for Dependencies type Dependencies struct { // a list of service IDs which this service depend on. If the service is enabled, those service are enabled as well automatically. @@ -17,3 +24,131 @@ type Dependencies struct { // a list of service IDs which this service depend on. When they are disabled a notification is sent. Soft *[]string `json:"soft,omitempty"` } + +// NewDependencies instantiates a new Dependencies object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDependencies() *Dependencies { + this := Dependencies{} + return &this +} + +// NewDependenciesWithDefaults instantiates a new Dependencies object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDependenciesWithDefaults() *Dependencies { + this := Dependencies{} + return &this +} + +// GetHard returns the Hard field value if set, zero value otherwise. +func (o *Dependencies) GetHard() *[]string { + if o == nil || IsNil(o.Hard) { + var ret *[]string + return ret + } + return o.Hard +} + +// GetHardOk returns a tuple with the Hard field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Dependencies) GetHardOk() (*[]string, bool) { + if o == nil || IsNil(o.Hard) { + return nil, false + } + return o.Hard, true +} + +// HasHard returns a boolean if a field has been set. +func (o *Dependencies) HasHard() bool { + if o != nil && !IsNil(o.Hard) { + return true + } + + return false +} + +// SetHard gets a reference to the given []string and assigns it to the Hard field. +func (o *Dependencies) SetHard(v *[]string) { + o.Hard = v +} + +// GetSoft returns the Soft field value if set, zero value otherwise. +func (o *Dependencies) GetSoft() *[]string { + if o == nil || IsNil(o.Soft) { + var ret *[]string + return ret + } + return o.Soft +} + +// GetSoftOk returns a tuple with the Soft field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Dependencies) GetSoftOk() (*[]string, bool) { + if o == nil || IsNil(o.Soft) { + return nil, false + } + return o.Soft, true +} + +// HasSoft returns a boolean if a field has been set. +func (o *Dependencies) HasSoft() bool { + if o != nil && !IsNil(o.Soft) { + return true + } + + return false +} + +// SetSoft gets a reference to the given []string and assigns it to the Soft field. +func (o *Dependencies) SetSoft(v *[]string) { + o.Soft = v +} + +func (o Dependencies) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Hard) { + toSerialize["hard"] = o.Hard + } + if !IsNil(o.Soft) { + toSerialize["soft"] = o.Soft + } + return toSerialize, nil +} + +type NullableDependencies struct { + value *Dependencies + isSet bool +} + +func (v NullableDependencies) Get() *Dependencies { + return v.value +} + +func (v *NullableDependencies) Set(val *Dependencies) { + v.value = val + v.isSet = true +} + +func (v NullableDependencies) IsSet() bool { + return v.isSet +} + +func (v *NullableDependencies) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDependencies(val *Dependencies) *NullableDependencies { + return &NullableDependencies{value: val, isSet: true} +} + +func (v NullableDependencies) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDependencies) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceenablement/model_list_service_status_200_response.go b/services/serviceenablement/model_list_service_status_200_response.go index 92de528de..d0816ce4a 100644 --- a/services/serviceenablement/model_list_service_status_200_response.go +++ b/services/serviceenablement/model_list_service_status_200_response.go @@ -10,8 +10,143 @@ API version: 1.1 package serviceenablement +import ( + "encoding/json" +) + +// checks if the ListServiceStatus200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListServiceStatus200Response{} + // ListServiceStatus200Response struct for ListServiceStatus200Response type ListServiceStatus200Response struct { Items *[]ServiceStatus `json:"items,omitempty"` NextCursor *string `json:"nextCursor,omitempty"` } + +// NewListServiceStatus200Response instantiates a new ListServiceStatus200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListServiceStatus200Response() *ListServiceStatus200Response { + this := ListServiceStatus200Response{} + return &this +} + +// NewListServiceStatus200ResponseWithDefaults instantiates a new ListServiceStatus200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListServiceStatus200ResponseWithDefaults() *ListServiceStatus200Response { + this := ListServiceStatus200Response{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListServiceStatus200Response) GetItems() *[]ServiceStatus { + if o == nil || IsNil(o.Items) { + var ret *[]ServiceStatus + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListServiceStatus200Response) GetItemsOk() (*[]ServiceStatus, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ListServiceStatus200Response) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []ServiceStatus and assigns it to the Items field. +func (o *ListServiceStatus200Response) SetItems(v *[]ServiceStatus) { + o.Items = v +} + +// GetNextCursor returns the NextCursor field value if set, zero value otherwise. +func (o *ListServiceStatus200Response) GetNextCursor() *string { + if o == nil || IsNil(o.NextCursor) { + var ret *string + return ret + } + return o.NextCursor +} + +// GetNextCursorOk returns a tuple with the NextCursor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListServiceStatus200Response) GetNextCursorOk() (*string, bool) { + if o == nil || IsNil(o.NextCursor) { + return nil, false + } + return o.NextCursor, true +} + +// HasNextCursor returns a boolean if a field has been set. +func (o *ListServiceStatus200Response) HasNextCursor() bool { + if o != nil && !IsNil(o.NextCursor) { + return true + } + + return false +} + +// SetNextCursor gets a reference to the given string and assigns it to the NextCursor field. +func (o *ListServiceStatus200Response) SetNextCursor(v *string) { + o.NextCursor = v +} + +func (o ListServiceStatus200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + if !IsNil(o.NextCursor) { + toSerialize["nextCursor"] = o.NextCursor + } + return toSerialize, nil +} + +type NullableListServiceStatus200Response struct { + value *ListServiceStatus200Response + isSet bool +} + +func (v NullableListServiceStatus200Response) Get() *ListServiceStatus200Response { + return v.value +} + +func (v *NullableListServiceStatus200Response) Set(val *ListServiceStatus200Response) { + v.value = val + v.isSet = true +} + +func (v NullableListServiceStatus200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableListServiceStatus200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListServiceStatus200Response(val *ListServiceStatus200Response) *NullableListServiceStatus200Response { + return &NullableListServiceStatus200Response{value: val, isSet: true} +} + +func (v NullableListServiceStatus200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListServiceStatus200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceenablement/model_parameters.go b/services/serviceenablement/model_parameters.go index a61bf034b..26a3cbeab 100644 --- a/services/serviceenablement/model_parameters.go +++ b/services/serviceenablement/model_parameters.go @@ -10,7 +10,107 @@ API version: 1.1 package serviceenablement +import ( + "encoding/json" +) + +// checks if the Parameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Parameters{} + // Parameters service parameters type Parameters struct { General *ParametersGeneral `json:"general,omitempty"` } + +// NewParameters instantiates a new Parameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewParameters() *Parameters { + this := Parameters{} + return &this +} + +// NewParametersWithDefaults instantiates a new Parameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewParametersWithDefaults() *Parameters { + this := Parameters{} + return &this +} + +// GetGeneral returns the General field value if set, zero value otherwise. +func (o *Parameters) GetGeneral() *ParametersGeneral { + if o == nil || IsNil(o.General) { + var ret *ParametersGeneral + return ret + } + return o.General +} + +// GetGeneralOk returns a tuple with the General field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Parameters) GetGeneralOk() (*ParametersGeneral, bool) { + if o == nil || IsNil(o.General) { + return nil, false + } + return o.General, true +} + +// HasGeneral returns a boolean if a field has been set. +func (o *Parameters) HasGeneral() bool { + if o != nil && !IsNil(o.General) { + return true + } + + return false +} + +// SetGeneral gets a reference to the given ParametersGeneral and assigns it to the General field. +func (o *Parameters) SetGeneral(v *ParametersGeneral) { + o.General = v +} + +func (o Parameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.General) { + toSerialize["general"] = o.General + } + return toSerialize, nil +} + +type NullableParameters struct { + value *Parameters + isSet bool +} + +func (v NullableParameters) Get() *Parameters { + return v.value +} + +func (v *NullableParameters) Set(val *Parameters) { + v.value = val + v.isSet = true +} + +func (v NullableParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableParameters(val *Parameters) *NullableParameters { + return &NullableParameters{value: val, isSet: true} +} + +func (v NullableParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceenablement/model_parameters_general.go b/services/serviceenablement/model_parameters_general.go index cf78a26c2..d43164922 100644 --- a/services/serviceenablement/model_parameters_general.go +++ b/services/serviceenablement/model_parameters_general.go @@ -10,9 +10,183 @@ API version: 1.1 package serviceenablement +import ( + "encoding/json" +) + +// checks if the ParametersGeneral type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ParametersGeneral{} + // ParametersGeneral struct for ParametersGeneral type ParametersGeneral struct { OrganizationId *string `json:"organizationId,omitempty"` ProjectName *string `json:"projectName,omitempty"` ProjectScope *string `json:"projectScope,omitempty"` } + +// NewParametersGeneral instantiates a new ParametersGeneral object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewParametersGeneral() *ParametersGeneral { + this := ParametersGeneral{} + var projectScope string = "PUBLIC" + this.ProjectScope = &projectScope + return &this +} + +// NewParametersGeneralWithDefaults instantiates a new ParametersGeneral object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewParametersGeneralWithDefaults() *ParametersGeneral { + this := ParametersGeneral{} + var projectScope string = "PUBLIC" + this.ProjectScope = &projectScope + return &this +} + +// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. +func (o *ParametersGeneral) GetOrganizationId() *string { + if o == nil || IsNil(o.OrganizationId) { + var ret *string + return ret + } + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ParametersGeneral) GetOrganizationIdOk() (*string, bool) { + if o == nil || IsNil(o.OrganizationId) { + return nil, false + } + return o.OrganizationId, true +} + +// HasOrganizationId returns a boolean if a field has been set. +func (o *ParametersGeneral) HasOrganizationId() bool { + if o != nil && !IsNil(o.OrganizationId) { + return true + } + + return false +} + +// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. +func (o *ParametersGeneral) SetOrganizationId(v *string) { + o.OrganizationId = v +} + +// GetProjectName returns the ProjectName field value if set, zero value otherwise. +func (o *ParametersGeneral) GetProjectName() *string { + if o == nil || IsNil(o.ProjectName) { + var ret *string + return ret + } + return o.ProjectName +} + +// GetProjectNameOk returns a tuple with the ProjectName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ParametersGeneral) GetProjectNameOk() (*string, bool) { + if o == nil || IsNil(o.ProjectName) { + return nil, false + } + return o.ProjectName, true +} + +// HasProjectName returns a boolean if a field has been set. +func (o *ParametersGeneral) HasProjectName() bool { + if o != nil && !IsNil(o.ProjectName) { + return true + } + + return false +} + +// SetProjectName gets a reference to the given string and assigns it to the ProjectName field. +func (o *ParametersGeneral) SetProjectName(v *string) { + o.ProjectName = v +} + +// GetProjectScope returns the ProjectScope field value if set, zero value otherwise. +func (o *ParametersGeneral) GetProjectScope() *string { + if o == nil || IsNil(o.ProjectScope) { + var ret *string + return ret + } + return o.ProjectScope +} + +// GetProjectScopeOk returns a tuple with the ProjectScope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ParametersGeneral) GetProjectScopeOk() (*string, bool) { + if o == nil || IsNil(o.ProjectScope) { + return nil, false + } + return o.ProjectScope, true +} + +// HasProjectScope returns a boolean if a field has been set. +func (o *ParametersGeneral) HasProjectScope() bool { + if o != nil && !IsNil(o.ProjectScope) { + return true + } + + return false +} + +// SetProjectScope gets a reference to the given string and assigns it to the ProjectScope field. +func (o *ParametersGeneral) SetProjectScope(v *string) { + o.ProjectScope = v +} + +func (o ParametersGeneral) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.OrganizationId) { + toSerialize["organizationId"] = o.OrganizationId + } + if !IsNil(o.ProjectName) { + toSerialize["projectName"] = o.ProjectName + } + if !IsNil(o.ProjectScope) { + toSerialize["projectScope"] = o.ProjectScope + } + return toSerialize, nil +} + +type NullableParametersGeneral struct { + value *ParametersGeneral + isSet bool +} + +func (v NullableParametersGeneral) Get() *ParametersGeneral { + return v.value +} + +func (v *NullableParametersGeneral) Set(val *ParametersGeneral) { + v.value = val + v.isSet = true +} + +func (v NullableParametersGeneral) IsSet() bool { + return v.isSet +} + +func (v *NullableParametersGeneral) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableParametersGeneral(val *ParametersGeneral) *NullableParametersGeneral { + return &NullableParametersGeneral{value: val, isSet: true} +} + +func (v NullableParametersGeneral) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableParametersGeneral) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceenablement/model_service_status.go b/services/serviceenablement/model_service_status.go index e63fd79e0..44a632cb0 100644 --- a/services/serviceenablement/model_service_status.go +++ b/services/serviceenablement/model_service_status.go @@ -10,6 +10,13 @@ API version: 1.1 package serviceenablement +import ( + "encoding/json" +) + +// checks if the ServiceStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceStatus{} + // ServiceStatus struct for ServiceStatus type ServiceStatus struct { Dependencies *Dependencies `json:"dependencies,omitempty"` @@ -24,3 +31,392 @@ type ServiceStatus struct { // the state of a service within a project State *string `json:"state,omitempty"` } + +// NewServiceStatus instantiates a new ServiceStatus object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceStatus() *ServiceStatus { + this := ServiceStatus{} + var enablement string = "REQUEST" + this.Enablement = &enablement + var lifecycle string = "FLEX" + this.Lifecycle = &lifecycle + var scope string = "PUBLIC" + this.Scope = &scope + var state string = "ENABLED" + this.State = &state + return &this +} + +// NewServiceStatusWithDefaults instantiates a new ServiceStatus object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceStatusWithDefaults() *ServiceStatus { + this := ServiceStatus{} + var enablement string = "REQUEST" + this.Enablement = &enablement + var lifecycle string = "FLEX" + this.Lifecycle = &lifecycle + var scope string = "PUBLIC" + this.Scope = &scope + var state string = "ENABLED" + this.State = &state + return &this +} + +// GetDependencies returns the Dependencies field value if set, zero value otherwise. +func (o *ServiceStatus) GetDependencies() *Dependencies { + if o == nil || IsNil(o.Dependencies) { + var ret *Dependencies + return ret + } + return o.Dependencies +} + +// GetDependenciesOk returns a tuple with the Dependencies field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceStatus) GetDependenciesOk() (*Dependencies, bool) { + if o == nil || IsNil(o.Dependencies) { + return nil, false + } + return o.Dependencies, true +} + +// HasDependencies returns a boolean if a field has been set. +func (o *ServiceStatus) HasDependencies() bool { + if o != nil && !IsNil(o.Dependencies) { + return true + } + + return false +} + +// SetDependencies gets a reference to the given Dependencies and assigns it to the Dependencies field. +func (o *ServiceStatus) SetDependencies(v *Dependencies) { + o.Dependencies = v +} + +// GetEnablement returns the Enablement field value if set, zero value otherwise. +func (o *ServiceStatus) GetEnablement() *string { + if o == nil || IsNil(o.Enablement) { + var ret *string + return ret + } + return o.Enablement +} + +// GetEnablementOk returns a tuple with the Enablement field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceStatus) GetEnablementOk() (*string, bool) { + if o == nil || IsNil(o.Enablement) { + return nil, false + } + return o.Enablement, true +} + +// HasEnablement returns a boolean if a field has been set. +func (o *ServiceStatus) HasEnablement() bool { + if o != nil && !IsNil(o.Enablement) { + return true + } + + return false +} + +// SetEnablement gets a reference to the given string and assigns it to the Enablement field. +func (o *ServiceStatus) SetEnablement(v *string) { + o.Enablement = v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *ServiceStatus) GetError() *ActionError { + if o == nil || IsNil(o.Error) { + var ret *ActionError + return ret + } + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceStatus) GetErrorOk() (*ActionError, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *ServiceStatus) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given ActionError and assigns it to the Error field. +func (o *ServiceStatus) SetError(v *ActionError) { + o.Error = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *ServiceStatus) GetLabels() *map[string]string { + if o == nil || IsNil(o.Labels) { + var ret *map[string]string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceStatus) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *ServiceStatus) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *ServiceStatus) SetLabels(v *map[string]string) { + o.Labels = v +} + +// GetLifecycle returns the Lifecycle field value if set, zero value otherwise. +func (o *ServiceStatus) GetLifecycle() *string { + if o == nil || IsNil(o.Lifecycle) { + var ret *string + return ret + } + return o.Lifecycle +} + +// GetLifecycleOk returns a tuple with the Lifecycle field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceStatus) GetLifecycleOk() (*string, bool) { + if o == nil || IsNil(o.Lifecycle) { + return nil, false + } + return o.Lifecycle, true +} + +// HasLifecycle returns a boolean if a field has been set. +func (o *ServiceStatus) HasLifecycle() bool { + if o != nil && !IsNil(o.Lifecycle) { + return true + } + + return false +} + +// SetLifecycle gets a reference to the given string and assigns it to the Lifecycle field. +func (o *ServiceStatus) SetLifecycle(v *string) { + o.Lifecycle = v +} + +// GetParameters returns the Parameters field value if set, zero value otherwise. +func (o *ServiceStatus) GetParameters() *Parameters { + if o == nil || IsNil(o.Parameters) { + var ret *Parameters + return ret + } + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceStatus) GetParametersOk() (*Parameters, bool) { + if o == nil || IsNil(o.Parameters) { + return nil, false + } + return o.Parameters, true +} + +// HasParameters returns a boolean if a field has been set. +func (o *ServiceStatus) HasParameters() bool { + if o != nil && !IsNil(o.Parameters) { + return true + } + + return false +} + +// SetParameters gets a reference to the given Parameters and assigns it to the Parameters field. +func (o *ServiceStatus) SetParameters(v *Parameters) { + o.Parameters = v +} + +// GetScope returns the Scope field value if set, zero value otherwise. +func (o *ServiceStatus) GetScope() *string { + if o == nil || IsNil(o.Scope) { + var ret *string + return ret + } + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceStatus) GetScopeOk() (*string, bool) { + if o == nil || IsNil(o.Scope) { + return nil, false + } + return o.Scope, true +} + +// HasScope returns a boolean if a field has been set. +func (o *ServiceStatus) HasScope() bool { + if o != nil && !IsNil(o.Scope) { + return true + } + + return false +} + +// SetScope gets a reference to the given string and assigns it to the Scope field. +func (o *ServiceStatus) SetScope(v *string) { + o.Scope = v +} + +// GetServiceId returns the ServiceId field value if set, zero value otherwise. +func (o *ServiceStatus) GetServiceId() *string { + if o == nil || IsNil(o.ServiceId) { + var ret *string + return ret + } + return o.ServiceId +} + +// GetServiceIdOk returns a tuple with the ServiceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceStatus) GetServiceIdOk() (*string, bool) { + if o == nil || IsNil(o.ServiceId) { + return nil, false + } + return o.ServiceId, true +} + +// HasServiceId returns a boolean if a field has been set. +func (o *ServiceStatus) HasServiceId() bool { + if o != nil && !IsNil(o.ServiceId) { + return true + } + + return false +} + +// SetServiceId gets a reference to the given string and assigns it to the ServiceId field. +func (o *ServiceStatus) SetServiceId(v *string) { + o.ServiceId = v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ServiceStatus) GetState() *string { + if o == nil || IsNil(o.State) { + var ret *string + return ret + } + return o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceStatus) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ServiceStatus) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ServiceStatus) SetState(v *string) { + o.State = v +} + +func (o ServiceStatus) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Dependencies) { + toSerialize["dependencies"] = o.Dependencies + } + if !IsNil(o.Enablement) { + toSerialize["enablement"] = o.Enablement + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Lifecycle) { + toSerialize["lifecycle"] = o.Lifecycle + } + if !IsNil(o.Parameters) { + toSerialize["parameters"] = o.Parameters + } + if !IsNil(o.Scope) { + toSerialize["scope"] = o.Scope + } + if !IsNil(o.ServiceId) { + toSerialize["serviceId"] = o.ServiceId + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableServiceStatus struct { + value *ServiceStatus + isSet bool +} + +func (v NullableServiceStatus) Get() *ServiceStatus { + return v.value +} + +func (v *NullableServiceStatus) Set(val *ServiceStatus) { + v.value = val + v.isSet = true +} + +func (v NullableServiceStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceStatus(val *ServiceStatus) *NullableServiceStatus { + return &NullableServiceStatus{value: val, isSet: true} +} + +func (v NullableServiceStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}