terraform-provider-stackitp.../pkg/kmsbeta/model_encrypt_payload.go
2026-01-21 09:07:29 +01:00

126 lines
3.5 KiB
Go

/*
STACKIT Key Management Service API
### DEPRECATED! This service is no longer maintained. Please use the version v1 instead. This API provides endpoints for managing keys and key rings.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package kmsbeta
import (
"encoding/json"
)
// checks if the EncryptPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EncryptPayload{}
/*
types and functions for data
*/
// isByteArray
type EncryptPayloadGetDataAttributeType = *[]byte
type EncryptPayloadGetDataArgType = []byte
type EncryptPayloadGetDataRetType = []byte
func getEncryptPayloadGetDataAttributeTypeOk(arg EncryptPayloadGetDataAttributeType) (ret EncryptPayloadGetDataRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setEncryptPayloadGetDataAttributeType(arg *EncryptPayloadGetDataAttributeType, val EncryptPayloadGetDataRetType) {
*arg = &val
}
// EncryptPayload struct for EncryptPayload
type EncryptPayload struct {
// The data that has to be encrypted. Encoded in base64.
// REQUIRED
Data EncryptPayloadGetDataAttributeType `json:"data" required:"true"`
}
type _EncryptPayload EncryptPayload
// NewEncryptPayload instantiates a new EncryptPayload 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 NewEncryptPayload(data EncryptPayloadGetDataArgType) *EncryptPayload {
this := EncryptPayload{}
setEncryptPayloadGetDataAttributeType(&this.Data, data)
return &this
}
// NewEncryptPayloadWithDefaults instantiates a new EncryptPayload 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 NewEncryptPayloadWithDefaults() *EncryptPayload {
this := EncryptPayload{}
return &this
}
// GetData returns the Data field value
func (o *EncryptPayload) GetData() (ret EncryptPayloadGetDataRetType) {
ret, _ = o.GetDataOk()
return ret
}
// GetDataOk returns a tuple with the Data field value
// and a boolean to check if the value has been set.
func (o *EncryptPayload) GetDataOk() (ret EncryptPayloadGetDataRetType, ok bool) {
return getEncryptPayloadGetDataAttributeTypeOk(o.Data)
}
// SetData sets field value
func (o *EncryptPayload) SetData(v EncryptPayloadGetDataRetType) {
setEncryptPayloadGetDataAttributeType(&o.Data, v)
}
func (o EncryptPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getEncryptPayloadGetDataAttributeTypeOk(o.Data); ok {
toSerialize["Data"] = val
}
return toSerialize, nil
}
type NullableEncryptPayload struct {
value *EncryptPayload
isSet bool
}
func (v NullableEncryptPayload) Get() *EncryptPayload {
return v.value
}
func (v *NullableEncryptPayload) Set(val *EncryptPayload) {
v.value = val
v.isSet = true
}
func (v NullableEncryptPayload) IsSet() bool {
return v.isSet
}
func (v *NullableEncryptPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEncryptPayload(val *EncryptPayload) *NullableEncryptPayload {
return &NullableEncryptPayload{value: val, isSet: true}
}
func (v NullableEncryptPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEncryptPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}