Files
sdk/model_dataroom_dataroom_document.go

459 lines
13 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the DataroomDataroomDocument type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DataroomDataroomDocument{}
// DataroomDataroomDocument struct for DataroomDataroomDocument
type DataroomDataroomDocument struct {
// ContentType is the mime type recorded at upload, null when none was sent.
ContentType *string `json:"contentType,omitempty"`
// CreatedAt is when the document was uploaded, in unix milliseconds.
CreatedAt *int64 `json:"createdAt,omitempty"`
// FileKey is the opaque object-storage key the bytes are stored under. It is scoped to the tenant's own key prefix and is not a URL.
FileKey *string `json:"fileKey,omitempty"`
// FileSize is the stored byte count, null when it was not recorded.
FileSize *int64 `json:"fileSize,omitempty"`
// ID is the document id.
Id *string `json:"id,omitempty"`
// Name is the document's display name.
Name *string `json:"name,omitempty"`
// NumPages is the page count, null when it was not supplied at upload.
NumPages *int64 `json:"numPages,omitempty"`
// Type is the document's kind, null when it was not recorded.
Type *string `json:"type,omitempty"`
// UpdatedAt is when the document row last changed, in unix milliseconds.
UpdatedAt *int64 `json:"updatedAt,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DataroomDataroomDocument DataroomDataroomDocument
// NewDataroomDataroomDocument instantiates a new DataroomDataroomDocument 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 NewDataroomDataroomDocument() *DataroomDataroomDocument {
this := DataroomDataroomDocument{}
return &this
}
// NewDataroomDataroomDocumentWithDefaults instantiates a new DataroomDataroomDocument 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 NewDataroomDataroomDocumentWithDefaults() *DataroomDataroomDocument {
this := DataroomDataroomDocument{}
return &this
}
// GetContentType returns the ContentType field value if set, zero value otherwise.
func (o *DataroomDataroomDocument) GetContentType() string {
if o == nil || IsNil(o.ContentType) {
var ret string
return ret
}
return *o.ContentType
}
// GetContentTypeOk returns a tuple with the ContentType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomDataroomDocument) GetContentTypeOk() (*string, bool) {
if o == nil || IsNil(o.ContentType) {
return nil, false
}
return o.ContentType, true
}
// HasContentType returns a boolean if a field has been set.
func (o *DataroomDataroomDocument) HasContentType() bool {
if o != nil && !IsNil(o.ContentType) {
return true
}
return false
}
// SetContentType gets a reference to the given string and assigns it to the ContentType field.
func (o *DataroomDataroomDocument) SetContentType(v string) {
o.ContentType = &v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *DataroomDataroomDocument) GetCreatedAt() int64 {
if o == nil || IsNil(o.CreatedAt) {
var ret int64
return ret
}
return *o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomDataroomDocument) GetCreatedAtOk() (*int64, bool) {
if o == nil || IsNil(o.CreatedAt) {
return nil, false
}
return o.CreatedAt, true
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *DataroomDataroomDocument) HasCreatedAt() bool {
if o != nil && !IsNil(o.CreatedAt) {
return true
}
return false
}
// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field.
func (o *DataroomDataroomDocument) SetCreatedAt(v int64) {
o.CreatedAt = &v
}
// GetFileKey returns the FileKey field value if set, zero value otherwise.
func (o *DataroomDataroomDocument) GetFileKey() string {
if o == nil || IsNil(o.FileKey) {
var ret string
return ret
}
return *o.FileKey
}
// GetFileKeyOk returns a tuple with the FileKey field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomDataroomDocument) GetFileKeyOk() (*string, bool) {
if o == nil || IsNil(o.FileKey) {
return nil, false
}
return o.FileKey, true
}
// HasFileKey returns a boolean if a field has been set.
func (o *DataroomDataroomDocument) HasFileKey() bool {
if o != nil && !IsNil(o.FileKey) {
return true
}
return false
}
// SetFileKey gets a reference to the given string and assigns it to the FileKey field.
func (o *DataroomDataroomDocument) SetFileKey(v string) {
o.FileKey = &v
}
// GetFileSize returns the FileSize field value if set, zero value otherwise.
func (o *DataroomDataroomDocument) GetFileSize() int64 {
if o == nil || IsNil(o.FileSize) {
var ret int64
return ret
}
return *o.FileSize
}
// GetFileSizeOk returns a tuple with the FileSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomDataroomDocument) GetFileSizeOk() (*int64, bool) {
if o == nil || IsNil(o.FileSize) {
return nil, false
}
return o.FileSize, true
}
// HasFileSize returns a boolean if a field has been set.
func (o *DataroomDataroomDocument) HasFileSize() bool {
if o != nil && !IsNil(o.FileSize) {
return true
}
return false
}
// SetFileSize gets a reference to the given int64 and assigns it to the FileSize field.
func (o *DataroomDataroomDocument) SetFileSize(v int64) {
o.FileSize = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *DataroomDataroomDocument) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomDataroomDocument) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *DataroomDataroomDocument) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *DataroomDataroomDocument) SetId(v string) {
o.Id = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *DataroomDataroomDocument) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomDataroomDocument) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *DataroomDataroomDocument) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *DataroomDataroomDocument) SetName(v string) {
o.Name = &v
}
// GetNumPages returns the NumPages field value if set, zero value otherwise.
func (o *DataroomDataroomDocument) GetNumPages() int64 {
if o == nil || IsNil(o.NumPages) {
var ret int64
return ret
}
return *o.NumPages
}
// GetNumPagesOk returns a tuple with the NumPages field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomDataroomDocument) GetNumPagesOk() (*int64, bool) {
if o == nil || IsNil(o.NumPages) {
return nil, false
}
return o.NumPages, true
}
// HasNumPages returns a boolean if a field has been set.
func (o *DataroomDataroomDocument) HasNumPages() bool {
if o != nil && !IsNil(o.NumPages) {
return true
}
return false
}
// SetNumPages gets a reference to the given int64 and assigns it to the NumPages field.
func (o *DataroomDataroomDocument) SetNumPages(v int64) {
o.NumPages = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *DataroomDataroomDocument) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomDataroomDocument) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *DataroomDataroomDocument) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *DataroomDataroomDocument) SetType(v string) {
o.Type = &v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *DataroomDataroomDocument) GetUpdatedAt() int64 {
if o == nil || IsNil(o.UpdatedAt) {
var ret int64
return ret
}
return *o.UpdatedAt
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomDataroomDocument) GetUpdatedAtOk() (*int64, bool) {
if o == nil || IsNil(o.UpdatedAt) {
return nil, false
}
return o.UpdatedAt, true
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *DataroomDataroomDocument) HasUpdatedAt() bool {
if o != nil && !IsNil(o.UpdatedAt) {
return true
}
return false
}
// SetUpdatedAt gets a reference to the given int64 and assigns it to the UpdatedAt field.
func (o *DataroomDataroomDocument) SetUpdatedAt(v int64) {
o.UpdatedAt = &v
}
func (o DataroomDataroomDocument) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DataroomDataroomDocument) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ContentType) {
toSerialize["contentType"] = o.ContentType
}
if !IsNil(o.CreatedAt) {
toSerialize["createdAt"] = o.CreatedAt
}
if !IsNil(o.FileKey) {
toSerialize["fileKey"] = o.FileKey
}
if !IsNil(o.FileSize) {
toSerialize["fileSize"] = o.FileSize
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.NumPages) {
toSerialize["numPages"] = o.NumPages
}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
if !IsNil(o.UpdatedAt) {
toSerialize["updatedAt"] = o.UpdatedAt
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DataroomDataroomDocument) UnmarshalJSON(data []byte) (err error) {
varDataroomDataroomDocument := _DataroomDataroomDocument{}
err = json.Unmarshal(data, &varDataroomDataroomDocument)
if err != nil {
return err
}
*o = DataroomDataroomDocument(varDataroomDataroomDocument)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "contentType")
delete(additionalProperties, "createdAt")
delete(additionalProperties, "fileKey")
delete(additionalProperties, "fileSize")
delete(additionalProperties, "id")
delete(additionalProperties, "name")
delete(additionalProperties, "numPages")
delete(additionalProperties, "type")
delete(additionalProperties, "updatedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDataroomDataroomDocument struct {
value *DataroomDataroomDocument
isSet bool
}
func (v NullableDataroomDataroomDocument) Get() *DataroomDataroomDocument {
return v.value
}
func (v *NullableDataroomDataroomDocument) Set(val *DataroomDataroomDocument) {
v.value = val
v.isSet = true
}
func (v NullableDataroomDataroomDocument) IsSet() bool {
return v.isSet
}
func (v *NullableDataroomDataroomDocument) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDataroomDataroomDocument(val *DataroomDataroomDocument) *NullableDataroomDataroomDocument {
return &NullableDataroomDataroomDocument{value: val, isSet: true}
}
func (v NullableDataroomDataroomDocument) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDataroomDataroomDocument) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}