代码拉取完成,页面将自动刷新
/*
N5g-ddnmf_Discovery API
N5g-ddnmf_Discovery Service. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_N5g_ddnmf_Discovery
import (
"encoding/json"
"fmt"
"time"
)
// checks if the AnnounceUpdateData type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AnnounceUpdateData{}
// AnnounceUpdateData Represents Announce Authorize Data to update
type AnnounceUpdateData struct {
DiscType DiscoveryType `json:"discType"`
// string with format 'date-time' as defined in OpenAPI.
ValidityTime time.Time `json:"validityTime"`
// Contains the ProSe Application Code.
ProseAppCode *string `json:"proseAppCode,omitempty"`
}
type _AnnounceUpdateData AnnounceUpdateData
// NewAnnounceUpdateData instantiates a new AnnounceUpdateData 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 NewAnnounceUpdateData(discType DiscoveryType, validityTime time.Time) *AnnounceUpdateData {
this := AnnounceUpdateData{}
this.DiscType = discType
this.ValidityTime = validityTime
return &this
}
// NewAnnounceUpdateDataWithDefaults instantiates a new AnnounceUpdateData 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 NewAnnounceUpdateDataWithDefaults() *AnnounceUpdateData {
this := AnnounceUpdateData{}
return &this
}
// GetDiscType returns the DiscType field value
func (o *AnnounceUpdateData) GetDiscType() DiscoveryType {
if o == nil {
var ret DiscoveryType
return ret
}
return o.DiscType
}
// GetDiscTypeOk returns a tuple with the DiscType field value
// and a boolean to check if the value has been set.
func (o *AnnounceUpdateData) GetDiscTypeOk() (*DiscoveryType, bool) {
if o == nil {
return nil, false
}
return &o.DiscType, true
}
// SetDiscType sets field value
func (o *AnnounceUpdateData) SetDiscType(v DiscoveryType) {
o.DiscType = v
}
// GetValidityTime returns the ValidityTime field value
func (o *AnnounceUpdateData) GetValidityTime() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.ValidityTime
}
// GetValidityTimeOk returns a tuple with the ValidityTime field value
// and a boolean to check if the value has been set.
func (o *AnnounceUpdateData) GetValidityTimeOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.ValidityTime, true
}
// SetValidityTime sets field value
func (o *AnnounceUpdateData) SetValidityTime(v time.Time) {
o.ValidityTime = v
}
// GetProseAppCode returns the ProseAppCode field value if set, zero value otherwise.
func (o *AnnounceUpdateData) GetProseAppCode() string {
if o == nil || IsNil(o.ProseAppCode) {
var ret string
return ret
}
return *o.ProseAppCode
}
// GetProseAppCodeOk returns a tuple with the ProseAppCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AnnounceUpdateData) GetProseAppCodeOk() (*string, bool) {
if o == nil || IsNil(o.ProseAppCode) {
return nil, false
}
return o.ProseAppCode, true
}
// HasProseAppCode returns a boolean if a field has been set.
func (o *AnnounceUpdateData) HasProseAppCode() bool {
if o != nil && !IsNil(o.ProseAppCode) {
return true
}
return false
}
// SetProseAppCode gets a reference to the given string and assigns it to the ProseAppCode field.
func (o *AnnounceUpdateData) SetProseAppCode(v string) {
o.ProseAppCode = &v
}
func (o AnnounceUpdateData) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AnnounceUpdateData) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["discType"] = o.DiscType
toSerialize["validityTime"] = o.ValidityTime
if !IsNil(o.ProseAppCode) {
toSerialize["proseAppCode"] = o.ProseAppCode
}
return toSerialize, nil
}
func (o *AnnounceUpdateData) 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{
"discType",
"validityTime",
}
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)
}
}
varAnnounceUpdateData := _AnnounceUpdateData{}
err = json.Unmarshal(bytes, &varAnnounceUpdateData)
if err != nil {
return err
}
*o = AnnounceUpdateData(varAnnounceUpdateData)
return err
}
type NullableAnnounceUpdateData struct {
value *AnnounceUpdateData
isSet bool
}
func (v NullableAnnounceUpdateData) Get() *AnnounceUpdateData {
return v.value
}
func (v *NullableAnnounceUpdateData) Set(val *AnnounceUpdateData) {
v.value = val
v.isSet = true
}
func (v NullableAnnounceUpdateData) IsSet() bool {
return v.isSet
}
func (v *NullableAnnounceUpdateData) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAnnounceUpdateData(val *AnnounceUpdateData) *NullableAnnounceUpdateData {
return &NullableAnnounceUpdateData{value: val, isSet: true}
}
func (v NullableAnnounceUpdateData) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAnnounceUpdateData) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。