代码拉取完成,页面将自动刷新
/*
CAPIF_Security_API
API for CAPIF security management. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_CAPIF_Security_API
import (
"encoding/json"
"fmt"
)
// checks if the SecurityNotification type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SecurityNotification{}
// SecurityNotification Represents revoked authorization notification details.
type SecurityNotification struct {
// String identifying the API invoker assigned by the CAPIF core function.
ApiInvokerId string `json:"apiInvokerId"`
// String identifying the AEF.
AefId *string `json:"aefId,omitempty"`
// Identifier of the service API
ApiIds []string `json:"apiIds"`
Cause Cause `json:"cause"`
}
type _SecurityNotification SecurityNotification
// NewSecurityNotification instantiates a new SecurityNotification 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 NewSecurityNotification(apiInvokerId string, apiIds []string, cause Cause) *SecurityNotification {
this := SecurityNotification{}
this.ApiInvokerId = apiInvokerId
this.ApiIds = apiIds
this.Cause = cause
return &this
}
// NewSecurityNotificationWithDefaults instantiates a new SecurityNotification 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 NewSecurityNotificationWithDefaults() *SecurityNotification {
this := SecurityNotification{}
return &this
}
// GetApiInvokerId returns the ApiInvokerId field value
func (o *SecurityNotification) GetApiInvokerId() string {
if o == nil {
var ret string
return ret
}
return o.ApiInvokerId
}
// GetApiInvokerIdOk returns a tuple with the ApiInvokerId field value
// and a boolean to check if the value has been set.
func (o *SecurityNotification) GetApiInvokerIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ApiInvokerId, true
}
// SetApiInvokerId sets field value
func (o *SecurityNotification) SetApiInvokerId(v string) {
o.ApiInvokerId = v
}
// GetAefId returns the AefId field value if set, zero value otherwise.
func (o *SecurityNotification) GetAefId() string {
if o == nil || IsNil(o.AefId) {
var ret string
return ret
}
return *o.AefId
}
// GetAefIdOk returns a tuple with the AefId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SecurityNotification) GetAefIdOk() (*string, bool) {
if o == nil || IsNil(o.AefId) {
return nil, false
}
return o.AefId, true
}
// HasAefId returns a boolean if a field has been set.
func (o *SecurityNotification) HasAefId() bool {
if o != nil && !IsNil(o.AefId) {
return true
}
return false
}
// SetAefId gets a reference to the given string and assigns it to the AefId field.
func (o *SecurityNotification) SetAefId(v string) {
o.AefId = &v
}
// GetApiIds returns the ApiIds field value
func (o *SecurityNotification) GetApiIds() []string {
if o == nil {
var ret []string
return ret
}
return o.ApiIds
}
// GetApiIdsOk returns a tuple with the ApiIds field value
// and a boolean to check if the value has been set.
func (o *SecurityNotification) GetApiIdsOk() ([]string, bool) {
if o == nil {
return nil, false
}
return o.ApiIds, true
}
// SetApiIds sets field value
func (o *SecurityNotification) SetApiIds(v []string) {
o.ApiIds = v
}
// GetCause returns the Cause field value
func (o *SecurityNotification) GetCause() Cause {
if o == nil {
var ret Cause
return ret
}
return o.Cause
}
// GetCauseOk returns a tuple with the Cause field value
// and a boolean to check if the value has been set.
func (o *SecurityNotification) GetCauseOk() (*Cause, bool) {
if o == nil {
return nil, false
}
return &o.Cause, true
}
// SetCause sets field value
func (o *SecurityNotification) SetCause(v Cause) {
o.Cause = v
}
func (o SecurityNotification) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SecurityNotification) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["apiInvokerId"] = o.ApiInvokerId
if !IsNil(o.AefId) {
toSerialize["aefId"] = o.AefId
}
toSerialize["apiIds"] = o.ApiIds
toSerialize["cause"] = o.Cause
return toSerialize, nil
}
func (o *SecurityNotification) 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{
"apiInvokerId",
"apiIds",
"cause",
}
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)
}
}
varSecurityNotification := _SecurityNotification{}
err = json.Unmarshal(bytes, &varSecurityNotification)
if err != nil {
return err
}
*o = SecurityNotification(varSecurityNotification)
return err
}
type NullableSecurityNotification struct {
value *SecurityNotification
isSet bool
}
func (v NullableSecurityNotification) Get() *SecurityNotification {
return v.value
}
func (v *NullableSecurityNotification) Set(val *SecurityNotification) {
v.value = val
v.isSet = true
}
func (v NullableSecurityNotification) IsSet() bool {
return v.isSet
}
func (v *NullableSecurityNotification) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSecurityNotification(val *SecurityNotification) *NullableSecurityNotification {
return &NullableSecurityNotification{value: val, isSet: true}
}
func (v NullableSecurityNotification) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSecurityNotification) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。