1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_scp_domain_routing_info_subscription.go 8.12 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
/*
NRF NFDiscovery Service
NRF NFDiscovery Service. © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.5
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Nnrf_NFDiscovery
import (
"encoding/json"
"fmt"
"time"
)
// checks if the ScpDomainRoutingInfoSubscription type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ScpDomainRoutingInfoSubscription{}
// ScpDomainRoutingInfoSubscription SCP Domain Routing Information Subscription
type ScpDomainRoutingInfoSubscription struct {
// String providing an URI formatted according to RFC 3986.
CallbackUri string `json:"callbackUri"`
// string with format 'date-time' as defined in OpenAPI.
ValidityTime *time.Time `json:"validityTime,omitempty"`
// String uniquely identifying a NF instance. The format of the NF Instance ID shall be a Universally Unique Identifier (UUID) version 4, as described in IETF RFC 4122.
ReqInstanceId *string `json:"reqInstanceId,omitempty"`
LocalInd *bool `json:"localInd,omitempty"`
}
type _ScpDomainRoutingInfoSubscription ScpDomainRoutingInfoSubscription
// NewScpDomainRoutingInfoSubscription instantiates a new ScpDomainRoutingInfoSubscription 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 NewScpDomainRoutingInfoSubscription(callbackUri string) *ScpDomainRoutingInfoSubscription {
this := ScpDomainRoutingInfoSubscription{}
this.CallbackUri = callbackUri
var localInd bool = false
this.LocalInd = &localInd
return &this
}
// NewScpDomainRoutingInfoSubscriptionWithDefaults instantiates a new ScpDomainRoutingInfoSubscription 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 NewScpDomainRoutingInfoSubscriptionWithDefaults() *ScpDomainRoutingInfoSubscription {
this := ScpDomainRoutingInfoSubscription{}
var localInd bool = false
this.LocalInd = &localInd
return &this
}
// GetCallbackUri returns the CallbackUri field value
func (o *ScpDomainRoutingInfoSubscription) GetCallbackUri() string {
if o == nil {
var ret string
return ret
}
return o.CallbackUri
}
// GetCallbackUriOk returns a tuple with the CallbackUri field value
// and a boolean to check if the value has been set.
func (o *ScpDomainRoutingInfoSubscription) GetCallbackUriOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.CallbackUri, true
}
// SetCallbackUri sets field value
func (o *ScpDomainRoutingInfoSubscription) SetCallbackUri(v string) {
o.CallbackUri = v
}
// GetValidityTime returns the ValidityTime field value if set, zero value otherwise.
func (o *ScpDomainRoutingInfoSubscription) GetValidityTime() time.Time {
if o == nil || IsNil(o.ValidityTime) {
var ret time.Time
return ret
}
return *o.ValidityTime
}
// GetValidityTimeOk returns a tuple with the ValidityTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScpDomainRoutingInfoSubscription) GetValidityTimeOk() (*time.Time, bool) {
if o == nil || IsNil(o.ValidityTime) {
return nil, false
}
return o.ValidityTime, true
}
// HasValidityTime returns a boolean if a field has been set.
func (o *ScpDomainRoutingInfoSubscription) HasValidityTime() bool {
if o != nil && !IsNil(o.ValidityTime) {
return true
}
return false
}
// SetValidityTime gets a reference to the given time.Time and assigns it to the ValidityTime field.
func (o *ScpDomainRoutingInfoSubscription) SetValidityTime(v time.Time) {
o.ValidityTime = &v
}
// GetReqInstanceId returns the ReqInstanceId field value if set, zero value otherwise.
func (o *ScpDomainRoutingInfoSubscription) GetReqInstanceId() string {
if o == nil || IsNil(o.ReqInstanceId) {
var ret string
return ret
}
return *o.ReqInstanceId
}
// GetReqInstanceIdOk returns a tuple with the ReqInstanceId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScpDomainRoutingInfoSubscription) GetReqInstanceIdOk() (*string, bool) {
if o == nil || IsNil(o.ReqInstanceId) {
return nil, false
}
return o.ReqInstanceId, true
}
// HasReqInstanceId returns a boolean if a field has been set.
func (o *ScpDomainRoutingInfoSubscription) HasReqInstanceId() bool {
if o != nil && !IsNil(o.ReqInstanceId) {
return true
}
return false
}
// SetReqInstanceId gets a reference to the given string and assigns it to the ReqInstanceId field.
func (o *ScpDomainRoutingInfoSubscription) SetReqInstanceId(v string) {
o.ReqInstanceId = &v
}
// GetLocalInd returns the LocalInd field value if set, zero value otherwise.
func (o *ScpDomainRoutingInfoSubscription) GetLocalInd() bool {
if o == nil || IsNil(o.LocalInd) {
var ret bool
return ret
}
return *o.LocalInd
}
// GetLocalIndOk returns a tuple with the LocalInd field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScpDomainRoutingInfoSubscription) GetLocalIndOk() (*bool, bool) {
if o == nil || IsNil(o.LocalInd) {
return nil, false
}
return o.LocalInd, true
}
// HasLocalInd returns a boolean if a field has been set.
func (o *ScpDomainRoutingInfoSubscription) HasLocalInd() bool {
if o != nil && !IsNil(o.LocalInd) {
return true
}
return false
}
// SetLocalInd gets a reference to the given bool and assigns it to the LocalInd field.
func (o *ScpDomainRoutingInfoSubscription) SetLocalInd(v bool) {
o.LocalInd = &v
}
func (o ScpDomainRoutingInfoSubscription) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ScpDomainRoutingInfoSubscription) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["callbackUri"] = o.CallbackUri
if !IsNil(o.ValidityTime) {
toSerialize["validityTime"] = o.ValidityTime
}
if !IsNil(o.ReqInstanceId) {
toSerialize["reqInstanceId"] = o.ReqInstanceId
}
if !IsNil(o.LocalInd) {
toSerialize["localInd"] = o.LocalInd
}
return toSerialize, nil
}
func (o *ScpDomainRoutingInfoSubscription) 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{
"callbackUri",
}
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)
}
}
varScpDomainRoutingInfoSubscription := _ScpDomainRoutingInfoSubscription{}
err = json.Unmarshal(bytes, &varScpDomainRoutingInfoSubscription)
if err != nil {
return err
}
*o = ScpDomainRoutingInfoSubscription(varScpDomainRoutingInfoSubscription)
return err
}
type NullableScpDomainRoutingInfoSubscription struct {
value *ScpDomainRoutingInfoSubscription
isSet bool
}
func (v NullableScpDomainRoutingInfoSubscription) Get() *ScpDomainRoutingInfoSubscription {
return v.value
}
func (v *NullableScpDomainRoutingInfoSubscription) Set(val *ScpDomainRoutingInfoSubscription) {
v.value = val
v.isSet = true
}
func (v NullableScpDomainRoutingInfoSubscription) IsSet() bool {
return v.isSet
}
func (v *NullableScpDomainRoutingInfoSubscription) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableScpDomainRoutingInfoSubscription(val *ScpDomainRoutingInfoSubscription) *NullableScpDomainRoutingInfoSubscription {
return &NullableScpDomainRoutingInfoSubscription{value: val, isSet: true}
}
func (v NullableScpDomainRoutingInfoSubscription) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableScpDomainRoutingInfoSubscription) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/konglinglong/openapi.git
git@gitee.com:konglinglong/openapi.git
konglinglong
openapi
openapi
e403a3c726a4

搜索帮助