代码拉取完成,页面将自动刷新
/*
JOSE Protected Message Forwarding API
N32-f Message Forwarding Service. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_JOSEProtectedMessageForwarding
import (
"encoding/json"
"fmt"
)
// checks if the RequestLine type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &RequestLine{}
// RequestLine Contains the request line of the HTTP API request being reformatted and forwarded over N32-f
type RequestLine struct {
Method HttpMethod `json:"method"`
Scheme UriScheme `json:"scheme"`
Authority string `json:"authority"`
Path string `json:"path"`
ProtocolVersion string `json:"protocolVersion"`
QueryFragment *string `json:"queryFragment,omitempty"`
}
type _RequestLine RequestLine
// NewRequestLine instantiates a new RequestLine 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 NewRequestLine(method HttpMethod, scheme UriScheme, authority string, path string, protocolVersion string) *RequestLine {
this := RequestLine{}
this.Method = method
this.Scheme = scheme
this.Authority = authority
this.Path = path
this.ProtocolVersion = protocolVersion
return &this
}
// NewRequestLineWithDefaults instantiates a new RequestLine 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 NewRequestLineWithDefaults() *RequestLine {
this := RequestLine{}
return &this
}
// GetMethod returns the Method field value
func (o *RequestLine) GetMethod() HttpMethod {
if o == nil {
var ret HttpMethod
return ret
}
return o.Method
}
// GetMethodOk returns a tuple with the Method field value
// and a boolean to check if the value has been set.
func (o *RequestLine) GetMethodOk() (*HttpMethod, bool) {
if o == nil {
return nil, false
}
return &o.Method, true
}
// SetMethod sets field value
func (o *RequestLine) SetMethod(v HttpMethod) {
o.Method = v
}
// GetScheme returns the Scheme field value
func (o *RequestLine) GetScheme() UriScheme {
if o == nil {
var ret UriScheme
return ret
}
return o.Scheme
}
// GetSchemeOk returns a tuple with the Scheme field value
// and a boolean to check if the value has been set.
func (o *RequestLine) GetSchemeOk() (*UriScheme, bool) {
if o == nil {
return nil, false
}
return &o.Scheme, true
}
// SetScheme sets field value
func (o *RequestLine) SetScheme(v UriScheme) {
o.Scheme = v
}
// GetAuthority returns the Authority field value
func (o *RequestLine) GetAuthority() string {
if o == nil {
var ret string
return ret
}
return o.Authority
}
// GetAuthorityOk returns a tuple with the Authority field value
// and a boolean to check if the value has been set.
func (o *RequestLine) GetAuthorityOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Authority, true
}
// SetAuthority sets field value
func (o *RequestLine) SetAuthority(v string) {
o.Authority = v
}
// GetPath returns the Path field value
func (o *RequestLine) GetPath() string {
if o == nil {
var ret string
return ret
}
return o.Path
}
// GetPathOk returns a tuple with the Path field value
// and a boolean to check if the value has been set.
func (o *RequestLine) GetPathOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Path, true
}
// SetPath sets field value
func (o *RequestLine) SetPath(v string) {
o.Path = v
}
// GetProtocolVersion returns the ProtocolVersion field value
func (o *RequestLine) GetProtocolVersion() string {
if o == nil {
var ret string
return ret
}
return o.ProtocolVersion
}
// GetProtocolVersionOk returns a tuple with the ProtocolVersion field value
// and a boolean to check if the value has been set.
func (o *RequestLine) GetProtocolVersionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ProtocolVersion, true
}
// SetProtocolVersion sets field value
func (o *RequestLine) SetProtocolVersion(v string) {
o.ProtocolVersion = v
}
// GetQueryFragment returns the QueryFragment field value if set, zero value otherwise.
func (o *RequestLine) GetQueryFragment() string {
if o == nil || IsNil(o.QueryFragment) {
var ret string
return ret
}
return *o.QueryFragment
}
// GetQueryFragmentOk returns a tuple with the QueryFragment field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RequestLine) GetQueryFragmentOk() (*string, bool) {
if o == nil || IsNil(o.QueryFragment) {
return nil, false
}
return o.QueryFragment, true
}
// HasQueryFragment returns a boolean if a field has been set.
func (o *RequestLine) HasQueryFragment() bool {
if o != nil && !IsNil(o.QueryFragment) {
return true
}
return false
}
// SetQueryFragment gets a reference to the given string and assigns it to the QueryFragment field.
func (o *RequestLine) SetQueryFragment(v string) {
o.QueryFragment = &v
}
func (o RequestLine) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o RequestLine) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["method"] = o.Method
toSerialize["scheme"] = o.Scheme
toSerialize["authority"] = o.Authority
toSerialize["path"] = o.Path
toSerialize["protocolVersion"] = o.ProtocolVersion
if !IsNil(o.QueryFragment) {
toSerialize["queryFragment"] = o.QueryFragment
}
return toSerialize, nil
}
func (o *RequestLine) 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{
"method",
"scheme",
"authority",
"path",
"protocolVersion",
}
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)
}
}
varRequestLine := _RequestLine{}
err = json.Unmarshal(bytes, &varRequestLine)
if err != nil {
return err
}
*o = RequestLine(varRequestLine)
return err
}
type NullableRequestLine struct {
value *RequestLine
isSet bool
}
func (v NullableRequestLine) Get() *RequestLine {
return v.value
}
func (v *NullableRequestLine) Set(val *RequestLine) {
v.value = val
v.isSet = true
}
func (v NullableRequestLine) IsSet() bool {
return v.isSet
}
func (v *NullableRequestLine) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRequestLine(val *RequestLine) *NullableRequestLine {
return &NullableRequestLine{value: val, isSet: true}
}
func (v NullableRequestLine) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRequestLine) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。