# ProductMediaFile

class ProductMediaFile extends DataModel

Media file model.

## Properties

protected array | $fields |  | from DataModel
protected boolean | $isEncrypted |  | from DataModel
protected Identity | $id |  |
protected Identity | $productId |  |
protected string | $mediaFileCategory |  |
protected string | $path |  |
protected string | $sort |  |
protected string | $type |  |
protected string | $url |  |
protected ProductMediaFileAttr[] | $attributes |  |
protected ProductMediaFileI18n[] | $i18ns |  |

## Methods

__construct()

Constructor

multitype:
getProperties()

Get the Model Properties

from Model
Model
setOptions(stdClass $object = null, array $options = null)

Sets Properties with matching Array Values

from DataModel
stdClass
getPublic(array $publics = array('fields', 'isEncrypted', 'identities', '_type'))

Convert the Model into stdClass Object

from DataModel
toJson()

No description

from Model
mixed:string
getFields()

Fields Getter

from DataModel
validate()

Object Validation

from DataModel
mixed:string|NULL
getField(boolean $toWawi = false, string $key)

Get a Model Member Name

from DataModel
map(boolean $toWawi = false, stdClass $obj = null)

Object Mapping

from DataModel
DataType
getModelType()

No description

from DataModel
boolean
isEncrypted()

Encrypted Status

from DataModel
setIdentity(string $propertyName, string|null $endpoint = null, int|null $host = null)

No description

from DataModel
setProperty($name, $value, $type)

No description

from DataModel
validateType($value, $type)

No description

from DataModel
ProductMediaFile
setId(Identity $id)

No description

Identity
getId()

No description

ProductMediaFile
setProductId(Identity $productId)

No description

Identity
getProductId()

No description

ProductMediaFile
setMediaFileCategory(string $mediaFileCategory)

No description

string
getMediaFileCategory()

No description

ProductMediaFile
setPath(string $path)

No description

string
getPath()

No description

ProductMediaFile
setSort(integer $sort)

No description

integer
getSort()

No description

ProductMediaFile
setType(string $type)

No description

string
getType()

No description

ProductMediaFile
setUrl(string $url)

No description

string
getUrl()

No description

ProductMediaFile
addAttribute(ProductMediaFileAttr $attribute)

No description

ProductMediaFile
setAttributes(array $attributes)

No description

ProductMediaFileAttr[]
getAttributes()

No description

ProductMediaFile
clearAttributes()

No description

ProductMediaFile
addI18n(ProductMediaFileI18n $i18n)

No description

ProductMediaFile
setI18ns(array $i18ns)

No description

ProductMediaFileI18n[]
getI18ns()

No description

ProductMediaFile
clearI18ns()

No description

## Details

###
at line 99
`__construct()`

Constructor

###
in Model at line 33
`multitype: getProperties()`

Get the Model Properties

#### Return Value

multitype: | string

###
in DataModel at line 172
`Model setOptions(stdClass $object = null, array $options = null)`

Sets Properties with matching Array Values

#### Parameters

stdClass | $object |
array | $options |

#### Return Value

Model |

###
in DataModel at line 70
`stdClass getPublic(array $publics = array('fields', 'isEncrypted', 'identities', '_type'))`

Convert the Model into stdClass Object

#### Parameters

array | $publics |

#### Return Value

stdClass | $object

###
in Model at line 115
`toJson()`

###
in DataModel at line 35
`mixed:string getFields()`

Fields Getter

#### Return Value

mixed:string |

###
in DataModel at line 45
`validate()`

Object Validation

#### Exceptions

SchemaException |

###
in DataModel at line 59
`mixed:string|NULL getField(boolean $toWawi = false, string $key)`

Get a Model Member Name

#### Parameters

boolean | $toWawi |
string | $key |

#### Return Value

mixed:string|NULL |

###
in DataModel at line 81
`map(boolean $toWawi = false, stdClass $obj = null)`

Object Mapping

#### Parameters

boolean | $toWawi |
stdClass | $obj | Object to map

###
in DataModel at line 42
`DataType getModelType()`

#### Return Value

DataType |

###
in DataModel at line 59
`boolean isEncrypted()`

Encrypted Status

#### Return Value

boolean |

###
in DataModel at line 123
`setIdentity(string $propertyName, string|null $endpoint = null, int|null $host = null)`

#### Parameters

string | $propertyName |
string|null | $endpoint |
int|null | $host |

###
in DataModel at line 179
`protected setProperty($name, $value, $type)`

#### Parameters

| $name |
| $value |
| $type |

###
in DataModel at line 190
`protected validateType($value, $type)`

#### Parameters

| $value |
| $type |

###
at line 110
`ProductMediaFile setId(Identity $id)`

#### Parameters

Identity | $id | Unique MediaFile id

#### Return Value

ProductMediaFile |

#### Exceptions

InvalidArgumentException | if the provided argument is not of type 'Identity'.

###
at line 118
`Identity getId()`

#### Return Value

Identity | Unique MediaFile id

###
at line 128
`ProductMediaFile setProductId(Identity $productId)`

#### Parameters

Identity | $productId | Reference to product

#### Return Value

ProductMediaFile |

#### Exceptions

InvalidArgumentException | if the provided argument is not of type 'Identity'.

###
at line 136
`Identity getProductId()`

#### Return Value

Identity | Reference to product

###
at line 145
`ProductMediaFile setMediaFileCategory(string $mediaFileCategory)`

#### Parameters

string | $mediaFileCategory | Optional media file category name

#### Return Value

ProductMediaFile |

###
at line 153
`string getMediaFileCategory()`

#### Return Value

string | Optional media file category name

###
at line 162
`ProductMediaFile setPath(string $path)`

#### Parameters

string | $path | File path

#### Return Value

ProductMediaFile |

###
at line 170
`string getPath()`

#### Return Value

string | File path

###
at line 179
`ProductMediaFile setSort(integer $sort)`

#### Parameters

integer | $sort | Optional sort number

#### Return Value

ProductMediaFile |

###
at line 187
`integer getSort()`

#### Return Value

integer | Optional sort number

###
at line 196
`ProductMediaFile setType(string $type)`

#### Parameters

string | $type | Media file type e.g. 'pdf'

#### Return Value

ProductMediaFile |

###
at line 204
`string getType()`

#### Return Value

string | Media file type e.g. 'pdf'

###
at line 213
`ProductMediaFile setUrl(string $url)`

#### Parameters

string | $url | Complete URL

#### Return Value

ProductMediaFile |

###
at line 221
`string getUrl()`

#### Return Value

string | Complete URL

###
at line 230
`ProductMediaFile addAttribute(ProductMediaFileAttr $attribute)`

#### Parameters

ProductMediaFileAttr | $attribute |

#### Return Value

ProductMediaFile |

###
at line 240
`ProductMediaFile setAttributes(array $attributes)`

#### Parameters

array | $attributes |

#### Return Value

ProductMediaFile |

###
at line 249
`ProductMediaFileAttr[] getAttributes()`

#### Return Value

ProductMediaFileAttr[] |

###
at line 257
`ProductMediaFile clearAttributes()`

#### Return Value

ProductMediaFile |

###
at line 267
`ProductMediaFile addI18n(ProductMediaFileI18n $i18n)`

#### Parameters

ProductMediaFileI18n | $i18n |

#### Return Value

ProductMediaFile |

###
at line 277
`ProductMediaFile setI18ns(array $i18ns)`

#### Parameters

array | $i18ns |

#### Return Value

ProductMediaFile |

###
at line 286
`ProductMediaFileI18n[] getI18ns()`

#### Return Value

ProductMediaFileI18n[] |

###
at line 294
`ProductMediaFile clearI18ns()`

#### Return Value

ProductMediaFile |