Ai
1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_bw_requirement.go 8.23 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
/*
Nnwdaf_MLModelProvision
Nnwdaf_MLModelProvision API 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_Nnwdaf_MLModelProvision
import (
"encoding/json"
"fmt"
)
// checks if the BwRequirement type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &BwRequirement{}
// BwRequirement Represents bandwidth requirements.
type BwRequirement struct {
// String providing an application identifier.
AppId string `json:"appId"`
// String representing a bit rate; the prefixes follow the standard symbols from The International System of Units, and represent x1000 multipliers, with the exception that prefix \"K\" is used to represent the standard symbol \"k\".
MarBwDl *string `json:"marBwDl,omitempty"`
// String representing a bit rate; the prefixes follow the standard symbols from The International System of Units, and represent x1000 multipliers, with the exception that prefix \"K\" is used to represent the standard symbol \"k\".
MarBwUl *string `json:"marBwUl,omitempty"`
// String representing a bit rate; the prefixes follow the standard symbols from The International System of Units, and represent x1000 multipliers, with the exception that prefix \"K\" is used to represent the standard symbol \"k\".
MirBwDl *string `json:"mirBwDl,omitempty"`
// String representing a bit rate; the prefixes follow the standard symbols from The International System of Units, and represent x1000 multipliers, with the exception that prefix \"K\" is used to represent the standard symbol \"k\".
MirBwUl *string `json:"mirBwUl,omitempty"`
}
type _BwRequirement BwRequirement
// NewBwRequirement instantiates a new BwRequirement 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 NewBwRequirement(appId string) *BwRequirement {
this := BwRequirement{}
this.AppId = appId
return &this
}
// NewBwRequirementWithDefaults instantiates a new BwRequirement 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 NewBwRequirementWithDefaults() *BwRequirement {
this := BwRequirement{}
return &this
}
// GetAppId returns the AppId field value
func (o *BwRequirement) GetAppId() string {
if o == nil {
var ret string
return ret
}
return o.AppId
}
// GetAppIdOk returns a tuple with the AppId field value
// and a boolean to check if the value has been set.
func (o *BwRequirement) GetAppIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.AppId, true
}
// SetAppId sets field value
func (o *BwRequirement) SetAppId(v string) {
o.AppId = v
}
// GetMarBwDl returns the MarBwDl field value if set, zero value otherwise.
func (o *BwRequirement) GetMarBwDl() string {
if o == nil || IsNil(o.MarBwDl) {
var ret string
return ret
}
return *o.MarBwDl
}
// GetMarBwDlOk returns a tuple with the MarBwDl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BwRequirement) GetMarBwDlOk() (*string, bool) {
if o == nil || IsNil(o.MarBwDl) {
return nil, false
}
return o.MarBwDl, true
}
// HasMarBwDl returns a boolean if a field has been set.
func (o *BwRequirement) HasMarBwDl() bool {
if o != nil && !IsNil(o.MarBwDl) {
return true
}
return false
}
// SetMarBwDl gets a reference to the given string and assigns it to the MarBwDl field.
func (o *BwRequirement) SetMarBwDl(v string) {
o.MarBwDl = &v
}
// GetMarBwUl returns the MarBwUl field value if set, zero value otherwise.
func (o *BwRequirement) GetMarBwUl() string {
if o == nil || IsNil(o.MarBwUl) {
var ret string
return ret
}
return *o.MarBwUl
}
// GetMarBwUlOk returns a tuple with the MarBwUl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BwRequirement) GetMarBwUlOk() (*string, bool) {
if o == nil || IsNil(o.MarBwUl) {
return nil, false
}
return o.MarBwUl, true
}
// HasMarBwUl returns a boolean if a field has been set.
func (o *BwRequirement) HasMarBwUl() bool {
if o != nil && !IsNil(o.MarBwUl) {
return true
}
return false
}
// SetMarBwUl gets a reference to the given string and assigns it to the MarBwUl field.
func (o *BwRequirement) SetMarBwUl(v string) {
o.MarBwUl = &v
}
// GetMirBwDl returns the MirBwDl field value if set, zero value otherwise.
func (o *BwRequirement) GetMirBwDl() string {
if o == nil || IsNil(o.MirBwDl) {
var ret string
return ret
}
return *o.MirBwDl
}
// GetMirBwDlOk returns a tuple with the MirBwDl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BwRequirement) GetMirBwDlOk() (*string, bool) {
if o == nil || IsNil(o.MirBwDl) {
return nil, false
}
return o.MirBwDl, true
}
// HasMirBwDl returns a boolean if a field has been set.
func (o *BwRequirement) HasMirBwDl() bool {
if o != nil && !IsNil(o.MirBwDl) {
return true
}
return false
}
// SetMirBwDl gets a reference to the given string and assigns it to the MirBwDl field.
func (o *BwRequirement) SetMirBwDl(v string) {
o.MirBwDl = &v
}
// GetMirBwUl returns the MirBwUl field value if set, zero value otherwise.
func (o *BwRequirement) GetMirBwUl() string {
if o == nil || IsNil(o.MirBwUl) {
var ret string
return ret
}
return *o.MirBwUl
}
// GetMirBwUlOk returns a tuple with the MirBwUl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BwRequirement) GetMirBwUlOk() (*string, bool) {
if o == nil || IsNil(o.MirBwUl) {
return nil, false
}
return o.MirBwUl, true
}
// HasMirBwUl returns a boolean if a field has been set.
func (o *BwRequirement) HasMirBwUl() bool {
if o != nil && !IsNil(o.MirBwUl) {
return true
}
return false
}
// SetMirBwUl gets a reference to the given string and assigns it to the MirBwUl field.
func (o *BwRequirement) SetMirBwUl(v string) {
o.MirBwUl = &v
}
func (o BwRequirement) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o BwRequirement) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["appId"] = o.AppId
if !IsNil(o.MarBwDl) {
toSerialize["marBwDl"] = o.MarBwDl
}
if !IsNil(o.MarBwUl) {
toSerialize["marBwUl"] = o.MarBwUl
}
if !IsNil(o.MirBwDl) {
toSerialize["mirBwDl"] = o.MirBwDl
}
if !IsNil(o.MirBwUl) {
toSerialize["mirBwUl"] = o.MirBwUl
}
return toSerialize, nil
}
func (o *BwRequirement) 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{
"appId",
}
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)
}
}
varBwRequirement := _BwRequirement{}
err = json.Unmarshal(bytes, &varBwRequirement)
if err != nil {
return err
}
*o = BwRequirement(varBwRequirement)
return err
}
type NullableBwRequirement struct {
value *BwRequirement
isSet bool
}
func (v NullableBwRequirement) Get() *BwRequirement {
return v.value
}
func (v *NullableBwRequirement) Set(val *BwRequirement) {
v.value = val
v.isSet = true
}
func (v NullableBwRequirement) IsSet() bool {
return v.isSet
}
func (v *NullableBwRequirement) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBwRequirement(val *BwRequirement) *NullableBwRequirement {
return &NullableBwRequirement{value: val, isSet: true}
}
func (v NullableBwRequirement) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBwRequirement) 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

搜索帮助