public function map(ValueObject $value): ContentMainLocationUpdateData
    {
        if (!$value instanceof ContentMetadataUpdateStruct) {
            throw new InvalidArgumentException('value', 'must be an instance of ' . ContentMetadataUpdateStruct::class);
        }

        $data = new ContentMainLocationUpdateData();

        $data->setLocation($value->mainLocationId);

        return $data;
    }
public function map(ValueObject $value): ContentMainLocationUpdateData
    {
        if (!$value instanceof ContentMetadataUpdateStruct) {
            throw new InvalidArgumentException('value', 'must be an instance of ' . ContentMetadataUpdateStruct::class);
        }

        $data = new ContentMainLocationUpdateData();

        $data->setLocation($value->mainLocationId);

        return $data;
    }
public function map ( ValueObject $ value ) : ContentMainLocationUpdateData { if ( ! $ value instanceof ContentMetadataUpdateStruct ) { throw new InvalidArgumentException ( 'value' , 'must be an instance of ' . ContentMetadataUpdateStruct :: class ) ; } $ data = new ContentMainLocationUpdateData ( ) ; $ data -> setLocation ( $ value -> mainLocationId ) ; return $ data ; }
Maps given ContentMetadataUpdateStruct object to a ContentMainLocationUpdateData object.

@param ContentMetadataUpdateStruct|ValueObject $value

@return ContentMainLocationUpdateData

@throws InvalidArgumentException
Maps given ContentMetadataUpdateStruct object to a ContentMainLocationUpdateData object .