1 Star 0 Fork 0

MrCoder / openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
model_consent_revoked.go 5.97 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 . update
/*
3gpp-monitoring-event
API for Monitoring Event. © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.2
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_MonitoringEvent
import (
"encoding/json"
"fmt"
)
// checks if the ConsentRevoked type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ConsentRevoked{}
// ConsentRevoked Represents the information related to a revoked user consent.
type ConsentRevoked struct {
UcPurpose UcPurpose `json:"ucPurpose"`
// string containing a local identifier followed by \"@\" and a domain identifier. Both the local identifier and the domain identifier shall be encoded as strings that do not contain any \"@\" characters. See Clause 4.6.2 of 3GPP TS 23.682 for more information.
ExternalId *string `json:"externalId,omitempty"`
// string formatted according to clause 3.3 of 3GPP TS 23.003 that describes an MSISDN.
Msisdn *string `json:"msisdn,omitempty"`
}
type _ConsentRevoked ConsentRevoked
// NewConsentRevoked instantiates a new ConsentRevoked 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 NewConsentRevoked(ucPurpose UcPurpose) *ConsentRevoked {
this := ConsentRevoked{}
return &this
}
// NewConsentRevokedWithDefaults instantiates a new ConsentRevoked 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 NewConsentRevokedWithDefaults() *ConsentRevoked {
this := ConsentRevoked{}
return &this
}
// GetUcPurpose returns the UcPurpose field value
func (o *ConsentRevoked) GetUcPurpose() UcPurpose {
if o == nil {
var ret UcPurpose
return ret
}
return o.UcPurpose
}
// GetUcPurposeOk returns a tuple with the UcPurpose field value
// and a boolean to check if the value has been set.
func (o *ConsentRevoked) GetUcPurposeOk() (*UcPurpose, bool) {
if o == nil {
return nil, false
}
return &o.UcPurpose, true
}
// SetUcPurpose sets field value
func (o *ConsentRevoked) SetUcPurpose(v UcPurpose) {
o.UcPurpose = v
}
// GetExternalId returns the ExternalId field value if set, zero value otherwise.
func (o *ConsentRevoked) GetExternalId() string {
if o == nil || IsNil(o.ExternalId) {
var ret string
return ret
}
return *o.ExternalId
}
// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ConsentRevoked) GetExternalIdOk() (*string, bool) {
if o == nil || IsNil(o.ExternalId) {
return nil, false
}
return o.ExternalId, true
}
// HasExternalId returns a boolean if a field has been set.
func (o *ConsentRevoked) HasExternalId() bool {
if o != nil && !IsNil(o.ExternalId) {
return true
}
return false
}
// SetExternalId gets a reference to the given string and assigns it to the ExternalId field.
func (o *ConsentRevoked) SetExternalId(v string) {
o.ExternalId = &v
}
// GetMsisdn returns the Msisdn field value if set, zero value otherwise.
func (o *ConsentRevoked) GetMsisdn() string {
if o == nil || IsNil(o.Msisdn) {
var ret string
return ret
}
return *o.Msisdn
}
// GetMsisdnOk returns a tuple with the Msisdn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ConsentRevoked) GetMsisdnOk() (*string, bool) {
if o == nil || IsNil(o.Msisdn) {
return nil, false
}
return o.Msisdn, true
}
// HasMsisdn returns a boolean if a field has been set.
func (o *ConsentRevoked) HasMsisdn() bool {
if o != nil && !IsNil(o.Msisdn) {
return true
}
return false
}
// SetMsisdn gets a reference to the given string and assigns it to the Msisdn field.
func (o *ConsentRevoked) SetMsisdn(v string) {
o.Msisdn = &v
}
func (o ConsentRevoked) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ConsentRevoked) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["ucPurpose"] = o.UcPurpose
if !IsNil(o.ExternalId) {
toSerialize["externalId"] = o.ExternalId
}
if !IsNil(o.Msisdn) {
toSerialize["msisdn"] = o.Msisdn
}
return toSerialize, nil
}
func (o *ConsentRevoked) UnmarshalJSON(bytes []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"ucPurpose",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(bytes, &allProperties)
if err != nil {
return err
}
for _, requiredProperty := range requiredProperties {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varConsentRevoked := _ConsentRevoked{}
err = json.Unmarshal(bytes, &varConsentRevoked)
if err != nil {
return err
}
*o = ConsentRevoked(varConsentRevoked)
return err
}
type NullableConsentRevoked struct {
value *ConsentRevoked
isSet bool
}
func (v NullableConsentRevoked) Get() *ConsentRevoked {
return v.value
}
func (v *NullableConsentRevoked) Set(val *ConsentRevoked) {
v.value = val
v.isSet = true
}
func (v NullableConsentRevoked) IsSet() bool {
return v.isSet
}
func (v *NullableConsentRevoked) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableConsentRevoked(val *ConsentRevoked) *NullableConsentRevoked {
return &NullableConsentRevoked{value: val, isSet: true}
}
func (v NullableConsentRevoked) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableConsentRevoked) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
Go
1
https://gitee.com/konglinglong/openapi.git
git@gitee.com:konglinglong/openapi.git
konglinglong
openapi
openapi
e403a3c726a4

搜索帮助