144 lines
2.9 KiB
Go
144 lines
2.9 KiB
Go
/*
|
|
Pulp 3 API
|
|
|
|
Fetch, Upload, Organize, and Distribute Software Packages
|
|
|
|
API version: v3
|
|
Contact: pulp-list@redhat.com
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package pulpclient
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the Group type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Group{}
|
|
|
|
// Group Serializer for Group.
|
|
type Group struct {
|
|
// Name
|
|
Name string `json:"name"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _Group Group
|
|
|
|
// NewGroup instantiates a new Group 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 NewGroup(name string) *Group {
|
|
this := Group{}
|
|
this.Name = name
|
|
return &this
|
|
}
|
|
|
|
// NewGroupWithDefaults instantiates a new Group 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 NewGroupWithDefaults() *Group {
|
|
this := Group{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *Group) GetName() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Group) GetNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Name, true
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *Group) SetName(v string) {
|
|
o.Name = v
|
|
}
|
|
|
|
func (o Group) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o Group) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["name"] = o.Name
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *Group) UnmarshalJSON(bytes []byte) (err error) {
|
|
varGroup := _Group{}
|
|
|
|
if err = json.Unmarshal(bytes, &varGroup); err == nil {
|
|
*o = Group(varGroup)
|
|
}
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "name")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGroup struct {
|
|
value *Group
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGroup) Get() *Group {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGroup) Set(val *Group) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGroup) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGroup) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGroup(val *Group) *NullableGroup {
|
|
return &NullableGroup{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGroup) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGroup) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|